Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.2
-
None
-
f4fedd8981bf89b690bc9167bf48c1cf5e5120f2
Description
Flickable keeps the mouse grab if it was recently flicked and another flick is started before it has settled. However, it is using the velocity of the flick rather than the instantaneous velocity of the view, which causes it to be grabbed unless the view has come to a complete stop:
void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event) { Q_Q(QDeclarativeFlickable); if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10)) stealMouse = true; // If we've been flicked then steal the click. else stealMouse = false;
Should be changed to:
- if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10)) + if (interactive && timeline.isActive() && (qAbs(hData.smoothVelocity.value()) > 10 || qAbs(vData.smoothVelocity.value()) > 10))