Fix saving of polygonItem's parent to SVG (caused crash in some cases)

preferencesAboutTextFull
Craig Watson 8 years ago
parent bd3d8e951b
commit 5ecc66a220
  1. 6
      src/adaptors/UBSvgSubsetAdaptor.cpp

@ -1562,9 +1562,9 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::polygonItemToSvgPolygon(UBGraphicsPo
}
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "uuid", UBStringUtils::toCanonicalUuid(polygonItem->uuid()));
if (polygonItem->parentItem()) {
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "parent", UBStringUtils::toCanonicalUuid(UBGraphicsItem::getOwnUuid(polygonItem->parentItem())));
}
UBGraphicsStrokesGroup* sg = polygonItem->strokesGroup();
if (sg)
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "parent", UBStringUtils::toCanonicalUuid(sg->uuid()));
mXmlWriter.writeEndElement();
}

Loading…
Cancel
Save