aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickflickable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickflickable.cpp')
-rw-r--r--src/quick/items/qquickflickable.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index e69c6a8d59..12b01b8aaf 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -1556,11 +1556,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;
}
@@ -1590,7 +1590,7 @@ void QQuickFlickable::timerEvent(QTimerEvent *event)
d->movementEndingTimer.stop();
d->pressed = false;
d->stealMouse = false;
- if (!d->velocityTimeline.isActive())
+ if (!d->velocityTimeline.isActive() && !d->timeline.isActive())
movementEnding(true, true);
}
}
@@ -1643,7 +1643,7 @@ void QQuickFlickable::viewportMoved(Qt::Orientations orient)
void QQuickFlickablePrivate::viewportAxisMoved(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
QQuickTimeLineCallback::Callback fixupCallback)
{
- if (pressed || calcVelocity) {
+ if (!scrollingPhase && (pressed || calcVelocity)) {
int elapsed = data.velocityTime.restart();
if (elapsed > 0) {
qreal velocity = (data.lastPos - data.move.value()) * 1000 / elapsed;
@@ -2216,7 +2216,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()