From 6d4f3582e244cd65afe10fbbb87dccc40f9f6ceb Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Mon, 6 Mar 2017 18:12:20 +0100 Subject: 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 --- src/location/declarativemaps/qquickgeomapgesturearea.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/location/declarativemaps/qquickgeomapgesturearea.cpp') 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(); } /*! -- cgit v1.2.3