From 1ce5763adc9d299041de1bb74d23e33ac9675c99 Mon Sep 17 00:00:00 2001 From: Anatoly Mihalchenko Date: Mon, 3 Sep 2012 12:25:54 +0300 Subject: [PATCH] SANKORE-1063 --- src/domain/UBGraphicsScene.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 6d1f5459..c25b65f6 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -1105,9 +1105,10 @@ void UBGraphicsScene::clearItems() if (!item->parentItem()) { - UBGraphicsPolygonItem* pi = qgraphicsitem_cast(item); + bool isPolygon = qgraphicsitem_cast(item) != NULL; + bool isStrokesGroup = qgraphicsitem_cast(item) != NULL; - if(!pi && !mTools.contains(item) && !isBackgroundObject(item)) + if(!isPolygon && !isStrokesGroup && !mTools.contains(item) && !isBackgroundObject(item)) { removeItem(item); removedItems << item;