summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorAndrew Christian <andyc@handhelds.org>2009-09-17 16:31:00 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-09-22 08:40:14 (GMT)
commitd14fd301314bcceaf2594a5a18f6d20894c1d353 (patch)
tree319e8a5926b084ae125dd0e56064f1c7c3302998 /src/gui/graphicsview/qgraphicsitem.cpp
parent7a410f71a1dffd224082a9e8f547baffbee9f514 (diff)
downloadQt-d14fd301314bcceaf2594a5a18f6d20894c1d353.zip
Qt-d14fd301314bcceaf2594a5a18f6d20894c1d353.tar.gz
Qt-d14fd301314bcceaf2594a5a18f6d20894c1d353.tar.bz2
Cached clip path not cleared correctly for ancestor that clips to shape
Fix QGraphicsItem to clear clip path for items with an ancestor that clips to shape. Added autotest to demonstrate clipping path problem. Merge-request: 810 Reviewed-by: Alexis Reviewed-by: Andreas
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 2ee03e4..5799fe7 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -5742,10 +5742,12 @@ void QGraphicsItem::prepareGeometryChange()
if (d_ptr->inSetPosHelper)
return;
- if (d_ptr->flags & ItemClipsChildrenToShape)
+ if (d_ptr->flags & ItemClipsChildrenToShape
+ || d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren) {
d_ptr->invalidateCachedClipPathRecursively();
- else
+ } else {
d_ptr->invalidateCachedClipPath();
+ }
}
/*!