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.
preferencesAboutTextFull
Craig Watson 9 years ago
parent 2d796827a4
commit 8ed2e2451d
  1. 15
      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<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;

Loading…
Cancel
Save