diff options
author | Andrew den Exter <[email protected]> | 2016-03-10 13:28:06 +1000 |
---|---|---|
committer | Andrew den Exter <[email protected]> | 2016-09-23 00:31:58 +0000 |
commit | 0aea009425242417bffdb171c8eca02ff52f4a7b (patch) | |
tree | a8c22df67944ee830c7a7d351748d5e8013a0c7a /src | |
parent | 345226aa3ecee8642c3bf46e40c981d4a49d958e (diff) |
Fix Flickable state being reset when it replays a delayed press.
Ignore mouseUngrabEvents() triggered by giving mouse grab to a child
item when replaying a delayed press event.
Change-Id: I6c8db61167e21bf10d533b17f7cc65e4754bd432
Reviewed-by: Shawn Rutledge <[email protected]>
Reviewed-by: Martin Jones <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickflickable.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index 870a0268e1..c838eae3c7 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -1539,11 +1539,11 @@ void QQuickFlickablePrivate::replayDelayedPress() // If we have the grab, release before delivering the event if (QQuickWindow *w = q->window()) { + replayingPressEvent = true; if (w->mouseGrabberItem() == q) q->ungrabMouse(); // Use the event handler that will take care of finding the proper item to propagate the event - replayingPressEvent = true; QCoreApplication::sendEvent(w, mouseEvent.data()); replayingPressEvent = false; } @@ -2199,7 +2199,8 @@ void QQuickFlickable::mouseUngrabEvent() Q_D(QQuickFlickable); // if our mouse grab has been removed (probably by another Flickable), // fix our state - d->cancelInteraction(); + if (!d->replayingPressEvent) + d->cancelInteraction(); } void QQuickFlickablePrivate::cancelInteraction() |