summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-07-20 10:37:53 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-07-20 10:37:53 (GMT)
commit2d01152b7ae3884473874a80b3b8cfd7f00c4b72 (patch)
tree2c1c2e68aa8237a51f1f8544b5142316d605e1d0 /src/gui
parent04bc2b1f37750a2afbb88521001758249a8df383 (diff)
parent4df9c96e2c213c39924e22e02621b0c61e83f8fe (diff)
downloadQt-2d01152b7ae3884473874a80b3b8cfd7f00c4b72.zip
Qt-2d01152b7ae3884473874a80b3b8cfd7f00c4b72.tar.gz
Qt-2d01152b7ae3884473874a80b3b8cfd7f00c4b72.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/gui')
-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);