SANKORE-1063

The annotations are erased when you select the Erase items
preferencesAboutTextFull
Anatoly Mihalchenko 12 years ago
parent 5a8b650caf
commit e441f2c2f8
  1. 6
      src/domain/UBGraphicsScene.cpp

@ -1103,18 +1103,16 @@ 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;
} }
} }
}
// force refresh, QT is a bit lazy and take a lot of time (nb item ^2 ?) to trigger repaint // force refresh, QT is a bit lazy and take a lot of time (nb item ^2 ?) to trigger repaint
update(sceneRect()); update(sceneRect());

Loading…
Cancel
Save