summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAndrew Christian <andyc@handhelds.org>2009-09-17 12:31:00 -0400
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-09-22 10:40:14 +0200
commitd14fd301314bcceaf2594a5a18f6d20894c1d353 (patch)
tree319e8a5926b084ae125dd0e56064f1c7c3302998 /src/gui
parent7a410f71a1dffd224082a9e8f547baffbee9f514 (diff)
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')
-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 2ee03e4d40..5799fe7155 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();
+ }
}
/*!