Commit a84471d7 authored by Claudio Valerio's avatar Claudio Valerio

fixed group persistance issue

parent a87682f6
...@@ -1336,20 +1336,21 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistGroupToDom(QGraphicsItem *gro ...@@ -1336,20 +1336,21 @@ 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); curSubElement.setAttribute(aId, tmpUuid);
curGroupElement.appendChild(curSubElement); curGroupElement.appendChild(curSubElement);
} }
} }
} }
}
} }
void UBSvgSubsetAdaptor::UBSvgSubsetWriter::polygonItemToSvgLine(UBGraphicsPolygonItem* polygonItem, bool groupHoldsInfo) void UBSvgSubsetAdaptor::UBSvgSubsetWriter::polygonItemToSvgLine(UBGraphicsPolygonItem* polygonItem, bool groupHoldsInfo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment