aboutsummaryrefslogtreecommitdiffstats
path: root/src/qtquick1/graphicsitems/qdeclarativepathview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qtquick1/graphicsitems/qdeclarativepathview.cpp')
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepathview.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qtquick1/graphicsitems/qdeclarativepathview.cpp b/src/qtquick1/graphicsitems/qdeclarativepathview.cpp
index 2c0875b4c4..d3284c799d 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepathview.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativepathview.cpp
@@ -1285,6 +1285,7 @@ bool QDeclarative1PathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
return d->stealMouse;
} else if (d->lastPosTime.isValid()) {
d->lastPosTime.invalidate();
+ d->fixOffset();
}
if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease)
d->stealMouse = false;
@@ -1309,6 +1310,22 @@ bool QDeclarative1PathView::sceneEventFilter(QGraphicsItem *i, QEvent *e)
return QDeclarativeItem::sceneEventFilter(i, e);
}
+bool QDeclarative1PathView::sceneEvent(QEvent *event)
+{
+ bool rv = QDeclarativeItem::sceneEvent(event);
+ if (event->type() == QEvent::UngrabMouse) {
+ Q_D(QDeclarative1PathView);
+ if (d->stealMouse) {
+ // if our mouse grab has been removed (probably by another Flickable),
+ // fix our state
+ d->stealMouse = false;
+ setKeepMouseGrab(false);
+ d->lastPosTime.invalidate();
+ }
+ }
+ return rv;
+}
+
bool QDeclarative1PathView::event(QEvent *event)
{
if (event->type() == QEvent::User) {