diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-07-13 22:24:29 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-07-13 22:24:29 (GMT) |
commit | 4cc84829f500827bcf22eecc1558ad86ac106552 (patch) | |
tree | d67d665b6f7a4d2b8f07a307aba0e1b0541a18fd | |
parent | 18fca750131302f9b89081ebf50b12221c922f6f (diff) | |
download | Qt-4cc84829f500827bcf22eecc1558ad86ac106552.zip Qt-4cc84829f500827bcf22eecc1558ad86ac106552.tar.gz Qt-4cc84829f500827bcf22eecc1558ad86ac106552.tar.bz2 |
Fix mouse grabbing for Flickable and PathView.
-rw-r--r-- | src/declarative/fx/qfxflickable.cpp | 1 | ||||
-rw-r--r-- | src/declarative/fx/qfxpathview.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp index 47b7aa1..24f6d72 100644 --- a/src/declarative/fx/qfxflickable.cpp +++ b/src/declarative/fx/qfxflickable.cpp @@ -740,6 +740,7 @@ void QFxFlickable::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_D(QFxFlickable); d->handleMouseReleaseEvent(event); event->accept(); + ungrabMouse(); } qreal QFxFlickable::minYExtent() const diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index 625d778..f940f68 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -489,6 +489,7 @@ void QFxPathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) d->lastPosTime = QTime(); d->stealMouse = false; + ungrabMouse(); } bool QFxPathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) @@ -524,8 +525,8 @@ bool QFxPathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) break; } grabber = static_cast<QFxItem*>(mouseGrabberItem()); - if (grabber && d->stealMouse && !grabber->keepMouseGrab()) - mouseGrabberItem()->ungrabMouse(); + if (grabber && d->stealMouse && !grabber->keepMouseGrab() && grabber != this) + grabMouse(); return d->stealMouse; } else if (!d->lastPosTime.isNull()) { |