Commit 8ed2e245 authored by Craig Watson's avatar Craig Watson

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.
parent 2d796827
......@@ -1077,20 +1077,6 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
{
QGraphicsItem *item = items.takeFirst();
// Is the item a strokes group?
UBGraphicsStrokesGroup* strokesGroupItem = qgraphicsitem_cast<UBGraphicsStrokesGroup*>(item);
if(strokesGroupItem && strokesGroupItem->isVisible()){
// Add the polygons
foreach(QGraphicsItem* item, strokesGroupItem->childItems()){
UBGraphicsPolygonItem* poly = qgraphicsitem_cast<UBGraphicsPolygonItem*>(item);
if(NULL != poly){
polygonItemToSvgPolygon(poly, true);
items.removeOne(poly);
}
}
}
// Is the item a polygon?
UBGraphicsPolygonItem *polygonItem = qgraphicsitem_cast<UBGraphicsPolygonItem*> (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;
......
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