summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativepathview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepathview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 31943b2..81c84f5 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -1112,16 +1112,16 @@ void QDeclarativePathViewPrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (!interactive || !lastPosTime.isValid())
return;
+ qreal newPc;
+ QPointF pathPoint = pointNear(event->pos(), &newPc);
if (!stealMouse) {
- QPointF delta = event->pos() - startPoint;
+ QPointF delta = pathPoint - startPoint;
if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance())
stealMouse = true;
}
if (stealMouse) {
moveReason = QDeclarativePathViewPrivate::Mouse;
- qreal newPc;
- pointNear(event->pos(), &newPc);
qreal diff = (newPc - startPc)*modelCount*mappedRange;
if (diff) {
setOffset(offset + diff);