diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-04-03 12:43:11 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-04-06 11:49:42 (GMT) |
commit | 4020327503eaefae42da4bd6e71125b6972ac97f (patch) | |
tree | 8195c5b634e4923e22322345d7331eb46d51b16a /src | |
parent | f4547b98b52bfc95fb0c14ec58df204cfcec0db2 (diff) | |
download | Qt-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')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 5 |
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); |