diff options
author | Allan Sandfeld Jensen <allan.jensen@nokia.com> | 2012-01-09 12:31:45 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-09 22:03:22 +0100 |
commit | aa23a18ad2d74232818aa70054b4a179a7a78dbb (patch) | |
tree | 230333eabacf22d813d567539ac53cdd99e8c6df /src | |
parent | 510eb8da78f082d5c41270deef33a41ec5428d42 (diff) |
Update the lastPosition with the full current position
By only updating parts of the lastPosition the axislock got confused, since the
direction would be calculated from a mix of delta-movement and movements since
touch begin.
Task-Number: QTBUG-23530
Change-Id: I6b886d4819b963aba18bb86154df172070399206
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/util/qscroller.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp index 1905cf5701..fac6809ac6 100644 --- a/src/widgets/util/qscroller.cpp +++ b/src/widgets/util/qscroller.cpp @@ -1524,10 +1524,8 @@ void QScrollerPrivate::handleDrag(const QPointF &position, qint64 timestamp) dragDistance += deltaPixel; // } //qScrollerDebug() << "######################" << deltaPixel << position.y() << lastPosition.y(); - if (canScrollX) - lastPosition.setX(position.x()); - if (canScrollY) - lastPosition.setY(position.y()); + + lastPosition = position; lastTimestamp = timestamp; } |