summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-09-14 12:31:42 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-09-14 13:29:36 (GMT)
commitf8cf4296e2f1174610b8e095e9d0a496392fe70a (patch)
tree5d089660652c4e41461def2718ab364db5929f5a /src/gui
parent39accdb3bbb86a298665507ca2700b20f56ba64d (diff)
downloadQt-f8cf4296e2f1174610b8e095e9d0a496392fe70a.zip
Qt-f8cf4296e2f1174610b8e095e9d0a496392fe70a.tar.gz
Qt-f8cf4296e2f1174610b8e095e9d0a496392fe70a.tar.bz2
QGraphicsWidget update issues with ItemHasNoContents + effect
Items with the ItemHasNoContents flag set are never drawn so the 'paintedViewBoundingRect' is never cached/updated resulting in updates wrongly being discarded. The solution is to always invalidate the children for such items. Auto test included. Task-number: QT-3803
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 36a24db..921e121 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4984,14 +4984,15 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
return;
}
- bool hasNoContents = item->d_ptr->flags & QGraphicsItem::ItemHasNoContents
- && !item->d_ptr->graphicsEffect;
+ bool hasNoContents = item->d_ptr->flags & QGraphicsItem::ItemHasNoContents;
if (!hasNoContents) {
item->d_ptr->dirty = 1;
if (fullItemUpdate)
item->d_ptr->fullUpdatePending = 1;
else if (!item->d_ptr->fullUpdatePending)
item->d_ptr->needsRepaint |= rect;
+ } else if (item->d_ptr->graphicsEffect) {
+ invalidateChildren = true;
}
if (invalidateChildren) {