summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxpathview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/fx/qfxpathview.cpp')
-rw-r--r--src/declarative/fx/qfxpathview.cpp5
1 files changed, 3 insertions, 2 deletions
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()) {