diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-04-28 10:30:59 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-04-28 08:57:52 +0000 |
commit | eab5437d3d5a2a80a1b583f3345370036e26dc44 (patch) | |
tree | 8b28b81121f66d794e0984656c2c325563b63a60 /src/quick | |
parent | 47479c0e969a3b3d220c77b8bb7cb8f2d58c07ae (diff) |
TapHandler: CancelGrabPassive => setPressed(false)
When a TapHandler's Item is inside a Flickable, the user has pressed
the mouse button over the TapHandler, and then the Flickable takes
the mouse grab during dragging from there, if the TapHandler has
only a passive grab, it is cancelled. In this case the TapHandler
should no longer be pressed, because it's being dragged instead.
Change-Id: I129f44cc9b8d8e99b00e23cd5943dd57d4ae5d16
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/handlers/qquicktaphandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index 14aeb07864..bf9a72c5ab 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -305,7 +305,7 @@ void QQuickTapHandler::setPressed(bool press, bool cancel, QQuickEventPoint *poi void QQuickTapHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point) { QQuickPointerSingleHandler::onGrabChanged(grabber, stateChange, point); - if (grabber == this && stateChange == QQuickEventPoint::CancelGrabExclusive) + if (grabber == this && (stateChange == QQuickEventPoint::CancelGrabExclusive || stateChange == QQuickEventPoint::CancelGrabPassive)) setPressed(false, true, point); } |