summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-04-03 12:43:11 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-04-06 11:49:42 (GMT)
commit4020327503eaefae42da4bd6e71125b6972ac97f (patch)
tree8195c5b634e4923e22322345d7331eb46d51b16a /src/gui/graphicsview
parentf4547b98b52bfc95fb0c14ec58df204cfcec0db2 (diff)
downloadQt-4020327503eaefae42da4bd6e71125b6972ac97f.zip
Qt-4020327503eaefae42da4bd6e71125b6972ac97f.tar.gz
Qt-4020327503eaefae42da4bd6e71125b6972ac97f.tar.bz2
Add a cut-off for simple rectangle lookups.
Make sure we use the rect-variation of QGraphicsScene's item lookup functions if the view has a simple transform and a simple expose region. Reviewed-by: Bjoern Erik Nilsen <bjorn.nilsen@nokia.com>
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index c421417..9191fc5 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -1056,6 +1056,11 @@ QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedReg
}
if (scene->d_func()->largestUntransformableItem.isNull()) {
+ if (exposedRegion.numRects() == 1 && matrix.type() <= QTransform::TxScale) {
+ return scene->d_func()->items_helper(exposedScenePath.controlPointRect(),
+ Qt::IntersectsItemBoundingRect,
+ Qt::DescendingOrder);
+ }
return scene->d_func()->items_helper(exposedScenePath,
Qt::IntersectsItemBoundingRect,
Qt::DescendingOrder);