diff options
author | Niklas Kurkisuo <ext-niklas.kurkisuo@nokia.com> | 2011-02-09 12:56:00 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2011-02-09 12:56:48 (GMT) |
commit | 67405c1b4d8ae5b47191ff1c28606453bf52295c (patch) | |
tree | 87ec6e376051a666c10588ff07542c2b4779091a /src/gui | |
parent | a6ccb1a72173cec6381d519a720dc08cfdc03720 (diff) | |
download | Qt-67405c1b4d8ae5b47191ff1c28606453bf52295c.zip Qt-67405c1b4d8ae5b47191ff1c28606453bf52295c.tar.gz Qt-67405c1b4d8ae5b47191ff1c28606453bf52295c.tar.bz2 |
Stop focus propagation of touch events when flag is set.
Added check to stop propagation of touch events for items that
have the QGraphicsItem::ItemStopsClickFocusPropagation flag set.
Merge-request: 1085
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 5e5077b..069f4dd 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5941,6 +5941,8 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve } if (item->isPanel()) break; + if (item->d_ptr->flags & QGraphicsItem::ItemStopsClickFocusPropagation) + break; } // If nobody could take focus, clear it. @@ -5973,6 +5975,8 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve } if (item && item->isPanel()) break; + if (item && (item->d_ptr->flags & QGraphicsItem::ItemStopsClickFocusPropagation)) + break; } touchEvent->setAccepted(eventAccepted); |