summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxpathview.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-13 22:24:29 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-13 22:24:29 (GMT)
commit4cc84829f500827bcf22eecc1558ad86ac106552 (patch)
treed67d665b6f7a4d2b8f07a307aba0e1b0541a18fd /src/declarative/fx/qfxpathview.cpp
parent18fca750131302f9b89081ebf50b12221c922f6f (diff)
downloadQt-4cc84829f500827bcf22eecc1558ad86ac106552.zip
Qt-4cc84829f500827bcf22eecc1558ad86ac106552.tar.gz
Qt-4cc84829f500827bcf22eecc1558ad86ac106552.tar.bz2
Fix mouse grabbing for Flickable and PathView.
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()) {