From 5ffb64de431a1314950dde7d7d88185de05d1111 Mon Sep 17 00:00:00 2001 From: shibakaneki Date: Mon, 30 Apr 2012 11:40:33 +0200 Subject: [PATCH] Backup of the strokes as objects --- src/adaptors/UBSvgSubsetAdaptor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index c616ae66..86ade4c9 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -428,7 +428,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() } else if (mXmlReader.name() == "g") { - // Create new stroke, if its NULL or already has poligons + // Create new stroke, if its NULL or already has polygons if (annotationGroup) { if (!annotationGroup->polygons().empty()) @@ -437,8 +437,9 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() else annotationGroup = new UBGraphicsStroke(); - if(eDrawingMode_Vector == dc->drawingMode()){ + if(eDrawingMode_Vector == dc->drawingMode()){ strokesGroup = new UBGraphicsStrokesGroup(); + graphicsItemFromSvg(strokesGroup); } QStringRef ubZValue = mXmlReader.attributes().value(mNamespaceUri, "z-value"); @@ -485,6 +486,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() if(eDrawingMode_Vector == dc->drawingMode()){ if(strokesGroup){ + polygonItem->setTransform(strokesGroup->transform()); strokesGroup->addToGroup(polygonItem); } }else{ @@ -510,6 +512,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() if(eDrawingMode_Vector == dc->drawingMode()){ if(strokesGroup){ + polygonItem->setTransform(strokesGroup->transform()); strokesGroup->addToGroup(polygonItem); } }else{ @@ -838,6 +841,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() { if(strokesGroup && scene){ scene->addItem(strokesGroup); + //graphicsItemFromSvg(strokesGroup); } if (annotationGroup)