summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-12-23 01:02:04 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-12-23 01:02:04 (GMT)
commit1699e8240b8073241f1aaddc12ded6065ef520b9 (patch)
tree11a0c722fffc8b45a761e8612f90393ac6e28104 /src/declarative/graphicsitems
parent01fd44cd76f2da1dd1e39d7e5632b3274ca895a3 (diff)
downloadQt-1699e8240b8073241f1aaddc12ded6065ef520b9.zip
Qt-1699e8240b8073241f1aaddc12ded6065ef520b9.tar.gz
Qt-1699e8240b8073241f1aaddc12ded6065ef520b9.tar.bz2
Ensure PathView doesn't jump when starting to drag.
Task-number: QTBUG-16133 Reviewed-by: Bea Lam
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 87ea214..a6f44b3 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -1133,8 +1133,10 @@ void QDeclarativePathViewPrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
QPointF pathPoint = pointNear(event->pos(), &newPc);
if (!stealMouse) {
QPointF delta = pathPoint - startPoint;
- if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance())
+ if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance()) {
stealMouse = true;
+ startPc = newPc;
+ }
}
if (stealMouse) {