MapView sends always the center point from the users view
[situare] / src / map / mapview.h
index 41a3a68..2cd627a 100644 (file)
@@ -174,6 +174,15 @@ private slots:
 
 private:
     /**
+    * @brief Returns the point which is considered by user as the visible center point
+    *
+    * Differs from view's center point when panel is open and view center point is shifted.
+    *
+    * @returns Center point
+    */
+    QPointF center();
+
+    /**
     * @brief Set new view scale
     *
     * @param viewScale New scaling factor
@@ -263,6 +272,7 @@ private:
     QPoint m_internalScenePosition;             ///< New center position (used for dragging)
     QPoint m_lastMouseEventScenePosition;       ///< Previous mouse event position in the scene
     QPoint m_lastMouseEventViewPosition;        ///< Previous mouse event position in the view
+    QPoint m_viewCenterPoint;                   ///< Center point of the MapView
 
     QPointF m_centerHorizontalShiftPoint;       ///< Current amount of center point shifting