diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp
index 84166e993..cb385888a 100644
--- a/src/app/valentina/xml/vpattern.cpp
+++ b/src/app/valentina/xml/vpattern.cpp
@@ -748,7 +748,9 @@ void VPattern::ParseDetailNodes(const QDomElement &domElement, VPiece &detail) c
if (not element.isNull() && element.tagName() == VToolSeamAllowance::TagNode)
{
const quint32 id = GetParametrUInt(element, AttrIdObject, NULL_ID_STR);
- const bool reverse = GetParametrUInt(element, VToolDetail::AttrReverse, "0");
+ const bool reverse = GetParametrUInt(element, VToolSeamAllowance::AttrNodeReverse, "0");
+ const qreal saBefore = GetParametrDouble(element, VToolSeamAllowance::AttrSABefore, "-1");
+ const qreal saAfter = GetParametrDouble(element, VToolSeamAllowance::AttrSAAfter, "-1");
const QString t = GetParametrString(element, AttrType, VToolSeamAllowance::NodePoint);
Tool tool;
@@ -771,7 +773,10 @@ void VPattern::ParseDetailNodes(const QDomElement &domElement, VPiece &detail) c
VException e(tr("Wrong tag name '%1'.").arg(t));
throw e;
}
- detail.Append(VPieceNode(id, tool, reverse));
+ VPieceNode node(id, tool, reverse);
+ node.SetSABefore(saBefore);
+ node.SetSAAfter(saAfter);
+ detail.Append(node);
}
}
}
diff --git a/src/libs/ifc/schema/pattern/v0.4.0.xsd b/src/libs/ifc/schema/pattern/v0.4.0.xsd
index ac4a4907c..e98b35b89 100644
--- a/src/libs/ifc/schema/pattern/v0.4.0.xsd
+++ b/src/libs/ifc/schema/pattern/v0.4.0.xsd
@@ -399,9 +399,11 @@
-
-
+
+
+
+
diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp
index af6b06943..ae60b869c 100644
--- a/src/libs/vtools/tools/vtoolseamallowance.cpp
+++ b/src/libs/vtools/tools/vtoolseamallowance.cpp
@@ -64,6 +64,8 @@ const QString VToolSeamAllowance::AttrNodeReverse = QStringLiteral("reverse")
const QString VToolSeamAllowance::AttrForbidFlipping = QStringLiteral("forbidFlipping");
const QString VToolSeamAllowance::AttrSeamAllowance = QStringLiteral("seamAllowance");
const QString VToolSeamAllowance::AttrWidth = QStringLiteral("width");
+const QString VToolSeamAllowance::AttrSABefore = QStringLiteral("before");
+const QString VToolSeamAllowance::AttrSAAfter = QStringLiteral("after");
const QString VToolSeamAllowance::NodeArc = QStringLiteral("NodeArc");
const QString VToolSeamAllowance::NodePoint = QStringLiteral("NodePoint");
@@ -204,12 +206,21 @@ void VToolSeamAllowance::AddNode(VAbstractPattern *doc, QDomElement &domElement,
doc->SetAttribute(nod, AttrIdObject, node.GetId());
- if (node.GetTypeTool() != Tool::NodePoint)
+ const Tool type = node.GetTypeTool();
+ if (type != Tool::NodePoint)
{
doc->SetAttribute(nod, AttrNodeReverse, static_cast(node.GetReverse()));
}
+ else
+ {
+ const qreal w1 = node.GetSABefore();
+ w1 < 0 ? domElement.removeAttribute(AttrSABefore) : doc->SetAttribute(nod, AttrSABefore, w1);
- switch (node.GetTypeTool())
+ const qreal w2 = node.GetSAAfter();
+ w2 < 0 ? domElement.removeAttribute(AttrSAAfter) : doc->SetAttribute(nod, AttrSAAfter, w2);
+ }
+
+ switch (type)
{
case (Tool::NodeArc):
doc->SetAttribute(nod, AttrType, NodeArc);
diff --git a/src/libs/vtools/tools/vtoolseamallowance.h b/src/libs/vtools/tools/vtoolseamallowance.h
index dd65595ee..8b1a76764 100644
--- a/src/libs/vtools/tools/vtoolseamallowance.h
+++ b/src/libs/vtools/tools/vtoolseamallowance.h
@@ -62,6 +62,8 @@ public:
static const QString AttrForbidFlipping;
static const QString AttrSeamAllowance;
static const QString AttrWidth;
+ static const QString AttrSABefore;
+ static const QString AttrSAAfter;
static const QString NodeArc;
static const QString NodePoint;