From 8ed2e2451dfb08000327e7a07e9a1f376ebda3d3 Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Tue, 8 Dec 2015 16:58:13 +0100 Subject: [PATCH] Removed export of polygons outside of groups The lines removed in this commit led to (presumably) unintended behavior: when saving a document, pen strokes were saved not as a group, but just as their constituent polygons. This meant that the following block of code, that handles saving pen strokes correctly, was never executed. This doesn't fix the z-Value issue (#12), but it seems to be a step in the right direction. --- src/adaptors/UBSvgSubsetAdaptor.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index 376a5f88..2ba03817 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -1077,20 +1077,6 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) { QGraphicsItem *item = items.takeFirst(); - // Is the item a strokes group? - UBGraphicsStrokesGroup* strokesGroupItem = qgraphicsitem_cast(item); - - if(strokesGroupItem && strokesGroupItem->isVisible()){ - // Add the polygons - foreach(QGraphicsItem* item, strokesGroupItem->childItems()){ - UBGraphicsPolygonItem* poly = qgraphicsitem_cast(item); - if(NULL != poly){ - polygonItemToSvgPolygon(poly, true); - items.removeOne(poly); - } - } - } - // Is the item a polygon? UBGraphicsPolygonItem *polygonItem = qgraphicsitem_cast (item); if (polygonItem && polygonItem->isVisible()) @@ -2112,6 +2098,7 @@ UBGraphicsMediaItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::videoItemFromSvg() void UBSvgSubsetAdaptor::UBSvgSubsetReader::graphicsItemFromSvg(QGraphicsItem* gItem) { + // TODO: check position QStringRef svgTransform = mXmlReader.attributes().value("transform"); QMatrix itemMatrix;