diff options
-rw-r--r-- | src/location/declarativemaps/qquickgeomapgesturearea.cpp | 3 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_mouse.qml | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/location/declarativemaps/qquickgeomapgesturearea.cpp b/src/location/declarativemaps/qquickgeomapgesturearea.cpp index 1703bcfa..43041da4 100644 --- a/src/location/declarativemaps/qquickgeomapgesturearea.cpp +++ b/src/location/declarativemaps/qquickgeomapgesturearea.cpp @@ -1722,7 +1722,8 @@ void QQuickGeoMapGestureArea::panStateMachine() */ bool QQuickGeoMapGestureArea::canStartPan() { - if (m_allPoints.count() == 0 || (m_acceptedGestures & PanGesture) == 0) + if (m_allPoints.count() == 0 || (m_acceptedGestures & PanGesture) == 0 + || m_mousePoint->state() == Qt::TouchPointReleased) // mouseReleaseEvent handling does not clear m_mousePoint, only ungrabMouse does -- QTBUG-66534 return false; // Check if thresholds for normal panning are met. diff --git a/tests/auto/declarative_ui/tst_map_mouse.qml b/tests/auto/declarative_ui/tst_map_mouse.qml index 07ef949f..e5294f67 100644 --- a/tests/auto/declarative_ui/tst_map_mouse.qml +++ b/tests/auto/declarative_ui/tst_map_mouse.qml @@ -669,6 +669,16 @@ Item { compare(mouseOverlapperDoubleClickedSpy.count, 4) } + function test_release_does_not_block_clicked() { // QTBUG-66534 + clear_data() + mousePress(map, 55, 75) + compare(mouseOverlapperPressedSpy.count, 1) + mouseRelease(map, 55, 25) + compare(mouseOverlapperReleasedSpy.count, 1) + mouseClick(map, 25, 25) + compare(mouseUpperClickedSpy.count, 1) + } + function test_zzz_basic_press_and_hold() { // _zzz_ to ensure execution last (takes time) clear_data(); wait(1000); |