if (!interactive || !timer.isValid() || !model || !modelCount)
return;
+ qint64 currentTimestamp = computeCurrentTime(event);
qreal newPc;
QPointF pathPoint = pointNear(event->localPos(), &newPc);
if (!stealMouse) {
if (qAbs(delta.x()) > qApp->styleHints()->startDragDistance() || qAbs(delta.y()) > qApp->styleHints()->startDragDistance()) {
stealMouse = true;
}
- }
-
- qint64 currentTimestamp = computeCurrentTime(event);
- if (stealMouse) {
+ } else {
moveReason = QQuickPathViewPrivate::Mouse;
qreal diff = (newPc - startPc)*modelCount*mappedRange;
if (diff) {
QMouseEvent mv(QEvent::MouseMove, QPoint(30,100), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
QGuiApplication::sendEvent(canvas, &mv);
}
+ // first move beyond threshold does not trigger drag
+ QVERIFY(!pathview->isMoving());
+
{
QMouseEvent mv(QEvent::MouseMove, QPoint(90,100), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
QGuiApplication::sendEvent(canvas, &mv);
}
+ // next move beyond threshold does trigger drag
+ QVERIFY(pathview->isMoving());
QVERIFY(pathview->currentIndex() != current);