summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-03-24 01:12:47 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2010-03-24 08:29:00 (GMT)
commitc8fa23a5edd790d9eed0620068a29e03e4202cac (patch)
tree777391f86bbdf5f8b65f381d5304cf5816a489c0 /src
parentb6b1dee9460d6fdde0b8ad005301c0a315ad30bf (diff)
downloadQt-c8fa23a5edd790d9eed0620068a29e03e4202cac.zip
Qt-c8fa23a5edd790d9eed0620068a29e03e4202cac.tar.gz
Qt-c8fa23a5edd790d9eed0620068a29e03e4202cac.tar.bz2
Invalidate the cache of QGraphicsEffect if a child becomes visible.
The effect might rely on a child to draw itself. So we need to redraw if a child become visible or invisible. Task-number:QTBUG-7843 Reviewed-by:janarve
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 9852323..e10c03a 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -2177,8 +2177,12 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo
QGraphicsItemCache *c = (QGraphicsItemCache *)qVariantValue<void *>(extra(ExtraCacheData));
if (c)
c->purge();
- if (scene)
+ if (scene) {
+#ifndef QT_NO_GRAPHICSEFFECT
+ invalidateParentGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
scene->d_func()->markDirty(q_ptr, QRectF(), /*invalidateChildren=*/false, /*force=*/true);
+ }
}
// Certain properties are dropped as an item becomes invisible.