diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-10-12 14:48:33 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-10-12 14:48:33 (GMT) |
commit | bc53cf1334738307110a661f19b6fbb9be9b72d6 (patch) | |
tree | 268f8a23eba6e491258d0189362e44deb3fdce6d /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | 8da7252de0badb818302763cbe62c38ad699f1f3 (diff) | |
parent | 8df79a473e1a7e5c79b9b10827985bf3e9501002 (diff) | |
download | Qt-bc53cf1334738307110a661f19b6fbb9be9b72d6.zip Qt-bc53cf1334738307110a661f19b6fbb9be9b72d6.tar.gz Qt-bc53cf1334738307110a661f19b6fbb9be9b72d6.tar.bz2 |
Merge commit '8df79a473e1a7e5c79b9b10827985bf3e9501002' into 4.6
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 056a7ce..0773559 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5478,11 +5478,11 @@ void QGraphicsScenePrivate::touchEventHandler(QTouchEvent *sceneTouchEvent) } if (itemsNeedingEvents.isEmpty()) { - sceneTouchEvent->ignore(); + sceneTouchEvent->accept(); return; } - bool acceptSceneTouchEvent = false; + bool ignoreSceneTouchEvent = true; QHash<QGraphicsItem *, StatesAndTouchPoints>::ConstIterator it = itemsNeedingEvents.constBegin(); const QHash<QGraphicsItem *, StatesAndTouchPoints>::ConstIterator end = itemsNeedingEvents.constEnd(); for (; it != end; ++it) { @@ -5525,19 +5525,20 @@ void QGraphicsScenePrivate::touchEventHandler(QTouchEvent *sceneTouchEvent) item->d_ptr->acceptedTouchBeginEvent = true; bool res = sendTouchBeginEvent(item, &touchEvent) && touchEvent.isAccepted(); - acceptSceneTouchEvent = acceptSceneTouchEvent || res; + if (!res) + ignoreSceneTouchEvent = false; break; } default: if (item->d_ptr->acceptedTouchBeginEvent) { updateTouchPointsForItem(item, &touchEvent); (void) sendEvent(item, &touchEvent); - acceptSceneTouchEvent = true; + ignoreSceneTouchEvent = false; } break; } } - sceneTouchEvent->setAccepted(acceptSceneTouchEvent); + sceneTouchEvent->setAccepted(ignoreSceneTouchEvent); } bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEvent *touchEvent) |