|
|
|
@ -1103,18 +1103,16 @@ void UBGraphicsScene::clearItems() |
|
|
|
|
{ |
|
|
|
|
QGraphicsItem* item = itItems.next(); |
|
|
|
|
|
|
|
|
|
if (!item->parentItem()) |
|
|
|
|
{ |
|
|
|
|
bool isGroup = qgraphicsitem_cast<UBGraphicsGroupContainerItem*>(item) != NULL; |
|
|
|
|
bool isPolygon = qgraphicsitem_cast<UBGraphicsPolygonItem*>(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); |
|
|
|
|
removedItems << item; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// force refresh, QT is a bit lazy and take a lot of time (nb item ^2 ?) to trigger repaint
|
|
|
|
|
update(sceneRect()); |
|
|
|
|