diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-04 17:51:41 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:34:39 (GMT) |
commit | f1ada923f7bbe8724d9a9d6a6b391a92c514c440 (patch) | |
tree | 9b10f39758def7f0282e5be8297de2d8aa60bde1 /src | |
parent | 9def469f9f83087fab9cb65c0200f2e6059519ad (diff) | |
download | Qt-f1ada923f7bbe8724d9a9d6a6b391a92c514c440.zip Qt-f1ada923f7bbe8724d9a9d6a6b391a92c514c440.tar.gz Qt-f1ada923f7bbe8724d9a9d6a6b391a92c514c440.tar.bz2 |
Discard updates outside the bounding rect.
Makes tst_QGraphicsItem::cacheMode happy.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index a2d885b..80ad19d 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -4168,7 +4168,7 @@ void QGraphicsItem::update(const QRectF &rect) } if (d_ptr->scene) - d_ptr->scene->d_func()->markDirty(this); + d_ptr->scene->d_func()->markDirty(this, rect); } /*! diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index c7a41d6..e5c65d1 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5381,6 +5381,9 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool uninitializedDirtyRect = false; } + if (dirtyRect.isEmpty()) + continue; // Discard updates outside the bounding rect. + QTransform deviceTransform = item->d_ptr->sceneTransform; if (view->isTransformed()) { if (!untransformableItem) |