aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-09-08 16:49:10 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-09-29 07:51:29 +0000
commitef8c6f6a0bf5e4c9ee41306f2df59048ab96038f (patch)
treeb784ec73739cd7d0adeba95c7dff055aa06ded30 /src/quick
parent2afb54fb51091765f79548b0b057795bc3c6eb38 (diff)
Flickable: don't activate velocityTimeline if scroll phase available
The velocity timeline does not need to drive the movement if we can be sure that there are enough wheel events coming from the OS to move the flickable smoothly. And when the velocityTimeline is not active, the movementEndingTimer will emit the movementEnded signal, as it should. Task-number: QTBUG-55871 Change-Id: I5569be3aa6335d43ba162967ee03d08de3ba8096 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/qquickflickable.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 760eeed452..7c45d1c5ad 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -1616,7 +1616,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;