summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorNiklas Kurkisuo <ext-niklas.kurkisuo@nokia.com>2011-02-09 13:56:00 +0100
committerHarald Fernengel <harald.fernengel@nokia.com>2011-02-09 13:56:48 +0100
commit67405c1b4d8ae5b47191ff1c28606453bf52295c (patch)
tree87ec6e376051a666c10588ff07542c2b4779091a /src/gui/graphicsview
parenta6ccb1a72173cec6381d519a720dc08cfdc03720 (diff)
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/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 5e5077bce3..069f4dd58e 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);