diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 7573dee59..7e21a3adc 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -1894,7 +1894,13 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement ToolsCommonAttributes(domElement, id); const qreal kCurve = GetParametrDouble(domElement, AttrKCurve, "1.0"); const QString color = GetParametrString(domElement, AttrColor, ColorBlack); - VSplinePath *path = new VSplinePath(kCurve); + const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, "0"); + + auto path = new VSplinePath(kCurve); + if (duplicate > 0) + { + path->SetDuplicate(duplicate); + } const QDomNodeList nodeList = domElement.childNodes(); const qint32 num = nodeList.size(); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp index 04ec5fcb0..5027f90f5 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp @@ -404,6 +404,18 @@ void VToolSplinePath::SaveOptions(QDomElement &tag, QSharedPointer &ob doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrKCurve, splPath->GetKCurve()); + if (splPath->GetDuplicate() > 0) + { + doc->SetAttribute(tag, AttrDuplicate, splPath->GetDuplicate()); + } + else + { + if (tag.hasAttribute(AttrDuplicate)) + { + tag.removeAttribute(AttrDuplicate); + } + } + doc->RemoveAllChild(tag); for (qint32 i = 0; i < splPath->CountPoint(); ++i) {