summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-03 10:53:57 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-08-03 10:53:57 (GMT)
commitd5491ecdde14659a913c9f476f18c45f1d9489bb (patch)
tree06cc52249feda9bd9e50ca47abb8ebd676c8a309 /src/gui/graphicsview/qgraphicsscene.cpp
parent42cdfaf86d34afeb6448723839fef70fe477deed (diff)
parenta41128af5373a0225c3548abd3eb82cd7e8f7a0e (diff)
downloadQt-d5491ecdde14659a913c9f476f18c45f1d9489bb.zip
Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.gz
Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into lighthouse
Conflicts: configure
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 4bc7f4c..48a0093 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -5178,7 +5178,12 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
// Process children.
if (itemHasChildren && item->d_ptr->dirtyChildren) {
const bool itemClipsChildrenToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape;
- if (itemClipsChildrenToShape) {
+ // Items with no content are threated as 'dummy' items which means they are never drawn and
+ // 'processed', so the painted view bounding rect is never up-to-date. This means that whenever
+ // such an item changes geometry, its children have to take care of the update regardless
+ // of whether the item clips children to shape or not.
+ const bool bypassUpdateClip = !itemHasContents && wasDirtyParentViewBoundingRects;
+ if (itemClipsChildrenToShape && !bypassUpdateClip) {
// Make sure child updates are clipped to the item's bounding rect.
for (int i = 0; i < views.size(); ++i)
views.at(i)->d_func()->setUpdateClip(item);