From 7d41759f87db72ff9b9ff1d8ce017f466440f2ef Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 4 Sep 2009 13:35:25 +1000 Subject: Don't call pure virtuals on deleting QGraphicsItem This also needs to be reviewed by andreas. Reviewed-by: Michael Brasser --- src/gui/graphicsview/qgraphicsitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index cdcb0c4..16a9a0a 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -4780,10 +4780,12 @@ void QGraphicsItemPrivate::updateCachedClipPathFromSetPosHelper(const QPointF &n if (transformData) thisToParentTransform = transformData->computedFullTransform(&thisToParentTransform); QGraphicsItem *clipParent = parent; - while (clipParent && !(clipParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape)) { + while (clipParent && !clipParent->d_ptr->inDestructor && !(clipParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape)) { thisToParentTransform *= clipParent->d_ptr->transformToParent(); clipParent = clipParent->d_ptr->parent; } + if (clipParent && clipParent->d_ptr->inDestructor) + return; // thisToParentTransform is now the same as q->itemTransform(clipParent), except // that the new position (which is not yet set on the item) is taken into account. -- cgit v0.12