Commit 6faeea9d authored by Craig Watson's avatar Craig Watson

Corrected pen stroke duplication issue (see below)

Presumably due to the change in how pen strokes were saved to file (commit
8ed2e245), pen strokes with pressure levels were badly saved. They were
converted to lines instead of polygons, meaning that every time a page
was saved or duplicated, the lines would look worse and worse -- and
artefacts would appear.

This should now be fixed.
parent 024322c8
......@@ -1145,11 +1145,15 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
}
}
if (polygonItem->isNominalLine())
polygonItemToSvgLine(polygonItem, groupHoldsInfo);
else
UBGraphicsStroke* stroke = dynamic_cast<UBGraphicsStroke* >(currentStroke);
if (stroke && stroke->hasPressure())
polygonItemToSvgPolygon(polygonItem, groupHoldsInfo);
else if (polygonItem->isNominalLine())
polygonItemToSvgLine(polygonItem, groupHoldsInfo);
continue;
}
......@@ -2100,7 +2104,6 @@ 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