summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qquickgeomapgesturearea.cpp
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2018-11-08 15:26:57 +0900
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-11-14 17:50:15 +0000
commit85df79b094d1097108a28424d6f9b3b76b3aee62 (patch)
tree98d63c5e92f3039565e973228f6087d96ca40ff8 /src/location/declarativemaps/qquickgeomapgesturearea.cpp
parent25c6840ff6585ca9f7ab1c168cdcdd18a68c7885 (diff)
downloadqtlocation-85df79b094d1097108a28424d6f9b3b76b3aee62.tar.gz
Fix unstable rotation gesture
Order of touch events are not sorted on some platform. When touch point 1 and 2 are swapped, map is rotated 180 degrees in a moment Change-Id: I9c308b805a6ca54519f26a9ff19217de7f947c17 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qquickgeomapgesturearea.cpp')
-rw-r--r--src/location/declarativemaps/qquickgeomapgesturearea.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qquickgeomapgesturearea.cpp b/src/location/declarativemaps/qquickgeomapgesturearea.cpp
index c6f4b42f..576aeeea 100644
--- a/src/location/declarativemaps/qquickgeomapgesturearea.cpp
+++ b/src/location/declarativemaps/qquickgeomapgesturearea.cpp
@@ -1087,6 +1087,7 @@ void QQuickGeoMapGestureArea::update()
m_allPoints << m_touchPoints;
if (m_allPoints.isEmpty() && !m_mousePoint.isNull())
m_allPoints << *m_mousePoint.data();
+ std::sort(m_allPoints.begin(), m_allPoints.end(), [](const QTouchEvent::TouchPoint &tp1, const QTouchEvent::TouchPoint &tp2) { return tp1.id() < tp2.id(); });
touchPointStateMachine();