test group uuid qgraphicsitem

preferencesAboutTextFull
Ivan Ilyin 13 years ago
parent 46e6b57e83
commit 7a2df02972
  1. 2
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 5
      src/domain/UBGraphicsScene.cpp

@ -1229,7 +1229,7 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
if (groupItem && groupItem->isVisible()) if (groupItem && groupItem->isVisible())
{ {
qDebug() << "came across the group during the parsing"; qDebug() << "came across the group during the parsing, uuid is " << groupItem->data(UBGraphicsItemData::ItemUuid).toString();
continue; continue;
} }
} }

@ -1509,6 +1509,11 @@ UBGraphicsGroupContainerItem *UBGraphicsScene::createGroup(QList<QGraphicsItem *
groupItem->setVisible(true); groupItem->setVisible(true);
groupItem->setFocus(); groupItem->setFocus();
qDebug() << groupItem->uuid().toString();
if (groupItem->uuid().isNull()) {
groupItem->setUuid(QUuid::createUuid());
}
if (enableUndoRedoStack) { //should be deleted after scene own undo stack implemented if (enableUndoRedoStack) { //should be deleted after scene own undo stack implemented
UBGraphicsItemUndoCommand* uc = new UBGraphicsItemUndoCommand(this, 0, groupItem); UBGraphicsItemUndoCommand* uc = new UBGraphicsItemUndoCommand(this, 0, groupItem);
UBApplication::undoStack->push(uc); UBApplication::undoStack->push(uc);

Loading…
Cancel
Save