diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 2ac1dca..5dd71e2 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4616,7 +4616,8 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b return; } - bool hasNoContents = item->d_ptr->flags & QGraphicsItem::ItemHasNoContents; + bool hasNoContents = item->d_ptr->flags & QGraphicsItem::ItemHasNoContents + && !item->d_ptr->graphicsEffect; if (!hasNoContents) { item->d_ptr->dirty = 1; if (fullItemUpdate) @@ -4706,11 +4707,15 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool return; } - const bool itemHasContents = !(item->d_ptr->flags & QGraphicsItem::ItemHasNoContents); + bool itemHasContents = !(item->d_ptr->flags & QGraphicsItem::ItemHasNoContents); const bool itemHasChildren = !item->d_ptr->children.isEmpty(); - if (!itemHasContents && !itemHasChildren) { - resetDirtyItem(item); - return; // Item has neither contents nor children!(?) + if (!itemHasContents) { + if (!itemHasChildren) { + resetDirtyItem(item); + return; // Item has neither contents nor children!(?) + } + if (item->d_ptr->graphicsEffect) + itemHasContents = true; } const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity); |