diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-09-14 12:31:42 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-09-14 13:29:36 (GMT) |
commit | f8cf4296e2f1174610b8e095e9d0a496392fe70a (patch) | |
tree | 5d089660652c4e41461def2718ab364db5929f5a /src/gui | |
parent | 39accdb3bbb86a298665507ca2700b20f56ba64d (diff) | |
download | Qt-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.cpp | 5 |
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) { |