diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-05-10 12:48:27 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-05-10 12:49:46 (GMT) |
commit | 79a173386abe7dbd0dba2bc8c96298484a3bba27 (patch) | |
tree | 1ffd829ac7b7e72d9f12e2917b3b95012601d298 /src/gui | |
parent | 7e79f0d7eb5285a778b5ec82b4f64b08be99b562 (diff) | |
download | Qt-79a173386abe7dbd0dba2bc8c96298484a3bba27.zip Qt-79a173386abe7dbd0dba2bc8c96298484a3bba27.tar.gz Qt-79a173386abe7dbd0dba2bc8c96298484a3bba27.tar.bz2 |
An improvement to the previous commit.
This fixes 005dc6c7448a724d3df496a1e528199f5a638ce0 that was pushed by mistake.
Task-number: QT-3349
Reviewed-by: trustme
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 2131993..c5e3644 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -696,10 +696,10 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) QHash<QGesture *, QGraphicsObject *>::iterator it; for (it = gestureTargets.begin(); it != gestureTargets.end();) { - if (it.value() == item) - it = gestureTargets.erase(it); - else - ++it; + if (it.value() == item) + it = gestureTargets.erase(it); + else + ++it; } } @@ -5968,8 +5968,7 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) if (gesture->state() == Qt::GestureStarted) startedGestures.insert(gesture); } else { - if (index->items().contains(target)) - gesturesPerItem[target].append(gesture); + gesturesPerItem[target].append(gesture); } } |