From d3ab7f5b16e704a2042b63dbe8e374994e92f325 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 30 Mar 2017 11:09:12 +0300 Subject: [PATCH] Return -1 if was used global seam allowance width instead of calculating its value. --HG-- branch : feature --- src/libs/vpatterndb/vpiecenode.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/libs/vpatterndb/vpiecenode.cpp b/src/libs/vpatterndb/vpiecenode.cpp index e2692521d..3a669297d 100644 --- a/src/libs/vpatterndb/vpiecenode.cpp +++ b/src/libs/vpatterndb/vpiecenode.cpp @@ -154,12 +154,22 @@ void VPieceNode::SetReverse(bool reverse) //--------------------------------------------------------------------------------------------------------------------- qreal VPieceNode::GetSABefore(const VContainer *data) const { + if (d->m_formulaWidthBefore == currentSeamAllowance) + { + return -1; + } + return EvalFormula(data, d->m_formulaWidthBefore); } //--------------------------------------------------------------------------------------------------------------------- qreal VPieceNode::GetSABefore(const VContainer *data, Unit unit) const { + if (d->m_formulaWidthBefore == currentSeamAllowance) + { + return -1; + } + qreal value = EvalFormula(data, d->m_formulaWidthBefore); if (value >= 0) { @@ -186,12 +196,22 @@ void VPieceNode::SetFormulaSABefore(const QString &formula) //--------------------------------------------------------------------------------------------------------------------- qreal VPieceNode::GetSAAfter(const VContainer *data) const { + if (d->m_formulaWidthAfter == currentSeamAllowance) + { + return -1; + } + return EvalFormula(data, d->m_formulaWidthAfter); } //--------------------------------------------------------------------------------------------------------------------- qreal VPieceNode::GetSAAfter(const VContainer *data, Unit unit) const { + if (d->m_formulaWidthAfter == currentSeamAllowance) + { + return -1; + } + qreal value = EvalFormula(data, d->m_formulaWidthAfter); if (value >= 0) {