fixed group persistance issue

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent a87682f6c7
commit a84471d731
  1. 13
      src/adaptors/UBSvgSubsetAdaptor.cpp

@ -1336,17 +1336,18 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistGroupToDom(QGraphicsItem *gro
curGroupElement.setAttribute(aId, uuid); curGroupElement.setAttribute(aId, uuid);
curParent->appendChild(curGroupElement); curParent->appendChild(curGroupElement);
qDebug() << groupItem->children().count();
foreach (QGraphicsItem *item, groupItem->childItems()) { foreach (QGraphicsItem *item, groupItem->childItems()) {
QUuid tmpUuid = UBGraphicsScene::getPersonalUuid(item); QUuid tmpUuid = UBGraphicsScene::getPersonalUuid(item);
if (!tmpUuid.isNull()) { if (!tmpUuid.isNull()) {
if (item->type() == UBGraphicsGroupContainerItem::Type && item->childItems().count()) if (item->type() == UBGraphicsGroupContainerItem::Type && item->childItems().count())
persistGroupToDom(item, curParent, groupDomDocument); persistGroupToDom(item, curParent, groupDomDocument);
} else {
else { QDomElement curSubElement = groupDomDocument->createElement(tElement);
QDomElement curSubElement = groupDomDocument->createElement(tElement); curSubElement.setAttribute(aId, tmpUuid);
curGroupElement.appendChild(curSubElement);
curSubElement.setAttribute(aId, tmpUuid); }
curGroupElement.appendChild(curSubElement);
} }
} }
} }

Loading…
Cancel
Save