Commit e441f2c2 authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

SANKORE-1063

The annotations are erased when you select the Erase items
parent 5a8b650c
...@@ -1103,16 +1103,14 @@ void UBGraphicsScene::clearItems() ...@@ -1103,16 +1103,14 @@ void UBGraphicsScene::clearItems()
{ {
QGraphicsItem* item = itItems.next(); QGraphicsItem* item = itItems.next();
if (!item->parentItem()) bool isGroup = qgraphicsitem_cast<UBGraphicsGroupContainerItem*>(item) != NULL;
{ bool isPolygon = qgraphicsitem_cast<UBGraphicsPolygonItem*>(item) != NULL;
bool isPolygon = qgraphicsitem_cast<UBGraphicsPolygonItem*>(item) != NULL; bool isStrokesGroup = qgraphicsitem_cast<UBGraphicsStrokesGroup*>(item) != NULL;
bool isStrokesGroup = qgraphicsitem_cast<UBGraphicsStrokesGroup*>(item) != NULL;
if(!isPolygon && !isStrokesGroup && !mTools.contains(item) && !isBackgroundObject(item)) if(!isGroup && !isPolygon && !isStrokesGroup && !mTools.contains(item) && !isBackgroundObject(item))
{ {
removeItem(item); removeItem(item);
removedItems << item; removedItems << item;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment