summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-06-04 08:28:11 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-06-07 16:09:31 (GMT)
commitd0a27b157c6a5d3cf4b75c6b1b71de399733f553 (patch)
tree8710d36dbf6326b36ce06d94cb8913d6c6fb37e6 /src/gui/graphicsview
parent4ebe96275944643a06ac4119ef707e1436df5781 (diff)
downloadQt-d0a27b157c6a5d3cf4b75c6b1b71de399733f553.zip
Qt-d0a27b157c6a5d3cf4b75c6b1b71de399733f553.tar.gz
Qt-d0a27b157c6a5d3cf4b75c6b1b71de399733f553.tar.bz2
Fixed GestureOverride event delivery in GraphicsView.
GestureOverride event was not respected when delivering to items in GraphicsView. Task-number: QTBUG-10745 Reviewed-by: Thomas Zander
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 22c3f92..53a24a8 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -6088,8 +6088,15 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event)
if (ev.isAccepted() || ev.isAccepted(g)) {
conflictedGestures.remove(g);
// mark the item as a gesture target
- if (item)
+ if (item) {
gestureTargets.insert(g, item.data());
+ QHash<QGraphicsObject *, QSet<QGesture *> >::iterator it, e;
+ it = cachedItemGestures.begin();
+ e = cachedItemGestures.end();
+ for(; it != e; ++it)
+ it.value().remove(g);
+ cachedItemGestures[item.data()].insert(g);
+ }
DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
<< "override was accepted:"
<< g << item.data();