summaryrefslogtreecommitdiffstats
path: root/src/location/declarativemaps/qquickgeomapgesturearea.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-03-06 18:12:20 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-03-07 12:05:11 +0000
commit6d4f3582e244cd65afe10fbbb87dccc40f9f6ceb (patch)
tree30bf30a1f330924518b559b5788da79f41a9957e /src/location/declarativemaps/qquickgeomapgesturearea.cpp
parent41ccb2bd887b7dcb130b1008a59e29a964484567 (diff)
Fix for map shaking during rotation gesture in presence of tilting
This fix makes the reanchoring happen last, preventing the shaking effect when rotating off center on a tilted map Change-Id: I139a7839663ad04a9966f18821308957de562c9e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qquickgeomapgesturearea.cpp')
-rw-r--r--src/location/declarativemaps/qquickgeomapgesturearea.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/location/declarativemaps/qquickgeomapgesturearea.cpp b/src/location/declarativemaps/qquickgeomapgesturearea.cpp
index ad18ad26..c2782f36 100644
--- a/src/location/declarativemaps/qquickgeomapgesturearea.cpp
+++ b/src/location/declarativemaps/qquickgeomapgesturearea.cpp
@@ -999,18 +999,18 @@ void QQuickGeoMapGestureArea::update()
if (isPinchActive() || m_pinch.m_pinchEnabled)
pinchStateMachine();
+ // Parallel state machine for rotation.
+ if (isRotationActive() || m_pinch.m_rotationEnabled)
+ rotationStateMachine();
+
// Parallel state machine for pan (since you can pan at the same time as pinching)
// The stopPan function ensures that pan stops immediately when disabled,
// but the isPanActive() below allows pan continue its current gesture if you disable
// the whole gesture.
+ // Pan goes last because it does reanchoring in updatePan() which makes the map
+ // properly rotate around the touch point centroid.
if (isPanActive() || m_flick.m_flickEnabled || m_flick.m_panEnabled)
panStateMachine();
-
- // Parallel state machine for rotation.
- // Rotation goes last because when panning and rotating, first the new center has to be set,
- // then the rotation has to be applied
- if (isRotationActive() || m_pinch.m_rotationEnabled)
- rotationStateMachine();
}
/*!