diff options
author | Chris Adams <chris.adams@jollamobile.com> | 2017-05-02 16:25:37 +1000 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-09-24 14:41:38 +0000 |
commit | 8fd398c9d2f5f54e446e0b402bc63a2edb50da6f (patch) | |
tree | 7aa1f7986e20fa6d2400eb9590fb58a246221e91 /src/quick/items | |
parent | c2494382432d66cc08c14877378354f1b6cd6bfd (diff) |
Prevent PathView's parent stealing mouse grab during double-flick
This commit fixes an issue where mouse events could be stolen by the
parent of a PathView due to the PathView not correctly setting the
keep-mouse-grab flag in handleMousePressEvent(). This commit ensures
that the flag is correctly set, so that the second flick in a double
flick is handled by the PathView rather than being stolen by the
parent.
Task-number: QTBUG-59620
Change-Id: Iccdfe16e7e80e6d1d31f95c3dba9c8839b20f30f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquickpathview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index 879db6284e..e7e19b041e 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -1632,6 +1632,7 @@ void QQuickPathView::mousePressEvent(QMouseEvent *event) void QQuickPathViewPrivate::handleMousePressEvent(QMouseEvent *event) { + Q_Q(QQuickPathView); if (!interactive || !items.count() || !model || !modelCount) return; velocityBuffer.clear(); @@ -1657,6 +1658,7 @@ void QQuickPathViewPrivate::handleMousePressEvent(QMouseEvent *event) stealMouse = true; // If we've been flicked then steal the click. else stealMouse = false; + q->setKeepMouseGrab(stealMouse); timer.start(); lastPosTime = computeCurrentTime(event); |