summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-12-11 11:28:58 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-12-14 14:18:36 (GMT)
commitb543f356ca9f4a1db72e937968f06804df7c17bd (patch)
tree3106fb5dfd5ccec99cab2cfdace978e41afb9022 /src
parent21c31b4a3ae972a4c2f03adebd43a2d6a27f8c93 (diff)
downloadQt-b543f356ca9f4a1db72e937968f06804df7c17bd.zip
Qt-b543f356ca9f4a1db72e937968f06804df7c17bd.tar.gz
Qt-b543f356ca9f4a1db72e937968f06804df7c17bd.tar.bz2
Fixed bug in graphics effects caching of graphics item hierarchies.
Make sure to invalidate the cache if the transform of a sub-item changes. Reviewed-by: Bjørn Erik Nilsen
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index b6820f7..fbfd8e6 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -7177,9 +7177,16 @@ void QGraphicsItem::prepareGeometryChange()
QGraphicsItem *parent = this;
while ((parent = parent->d_ptr->parent)) {
- parent->d_ptr->dirtyChildrenBoundingRect = 1;
+ QGraphicsItemPrivate *parentp = parent->d_ptr.data();
+ parentp->dirtyChildrenBoundingRect = 1;
// ### Only do this if the parent's effect applies to the entire subtree.
- parent->d_ptr->notifyBoundingRectChanged = 1;
+ parentp->notifyBoundingRectChanged = 1;
+#ifndef QT_NO_GRAPHICSEFFECT
+ if (parentp->scene && parentp->graphicsEffect) {
+ parentp->notifyInvalidated = 1;
+ static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()->source->d_func())->invalidateCache();
+ }
+#endif
}
}