diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-13 11:00:06 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-13 11:08:02 (GMT) |
commit | 3d55ab91148c13f1905a4c1983d144efb4315297 (patch) | |
tree | f06420473317420a8909c2b654b964e665b2dd6b /src/gui/graphicsview | |
parent | 486bd135faa2c8269044f9c03597bc6b05644540 (diff) | |
download | Qt-3d55ab91148c13f1905a4c1983d144efb4315297.zip Qt-3d55ab91148c13f1905a4c1983d144efb4315297.tar.gz Qt-3d55ab91148c13f1905a4c1983d144efb4315297.tar.bz2 |
Cut-off in QGraphicsView not hit if setting a scene rect.
QGraphicsScene::sceneRect() returns the growingItemsBoundingRect if not
a particular scene rect is set; otherwise the sceneRect is returned.
This cut-off aims to do less processing when the exposed region covers
the entire scene, but it won't get hit in case of a sceneRect because we
always check against the growingItemsBoundingRect.
Task-number: 257192
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 3a8a696..bcfd68c 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -971,7 +971,7 @@ QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedReg // rect does not take into account untransformable items. const QRectF exposedRegionSceneBounds = q->mapToScene(exposedRegion.boundingRect().adjusted(-1, -1, 1, 1)) .boundingRect(); - if (exposedRegionSceneBounds.contains(scene->d_func()->growingItemsBoundingRect)) { + if (exposedRegionSceneBounds.contains(scene->sceneRect())) { Q_ASSERT(allItems); *allItems = true; |