From e441f2c2f86fed46fd8e174f4b2929f60a09f036 Mon Sep 17 00:00:00 2001 From: Anatoly Mihalchenko Date: Mon, 3 Sep 2012 15:10:39 +0300 Subject: [PATCH] SANKORE-1063 The annotations are erased when you select the Erase items --- src/domain/UBGraphicsScene.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index c25b65f6..86d19d34 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -1103,16 +1103,14 @@ void UBGraphicsScene::clearItems() { QGraphicsItem* item = itItems.next(); - if (!item->parentItem()) - { - bool isPolygon = qgraphicsitem_cast(item) != NULL; - bool isStrokesGroup = qgraphicsitem_cast(item) != NULL; + bool isGroup = qgraphicsitem_cast(item) != NULL; + bool isPolygon = qgraphicsitem_cast(item) != NULL; + bool isStrokesGroup = qgraphicsitem_cast(item) != NULL; - if(!isPolygon && !isStrokesGroup && !mTools.contains(item) && !isBackgroundObject(item)) - { - removeItem(item); - removedItems << item; - } + if(!isGroup && !isPolygon && !isStrokesGroup && !mTools.contains(item) && !isBackgroundObject(item)) + { + removeItem(item); + removedItems << item; } }