From 7a2df0297263cd4002c535937529e9a0dd54a94a Mon Sep 17 00:00:00 2001 From: Ivan Ilyin Date: Wed, 23 May 2012 17:07:50 +0200 Subject: [PATCH] test group uuid qgraphicsitem --- src/adaptors/UBSvgSubsetAdaptor.cpp | 2 +- src/domain/UBGraphicsScene.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index 286d148d..583e0826 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -1229,7 +1229,7 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) 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; } } diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index bbe74fc1..61633201 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -1509,6 +1509,11 @@ UBGraphicsGroupContainerItem *UBGraphicsScene::createGroup(QListsetVisible(true); 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 UBGraphicsItemUndoCommand* uc = new UBGraphicsItemUndoCommand(this, 0, groupItem); UBApplication::undoStack->push(uc);