Fix bug in dialog Seam allowance tool.
When create a piece and call a context menu Valentina blocks creating because of wrong formulas. --HG-- branch : develop
This commit is contained in:
parent
a0643e5712
commit
037d1daaaa
|
@ -969,8 +969,8 @@ void DialogSeamAllowance::NodeChanged(int index)
|
|||
}
|
||||
else
|
||||
{
|
||||
uiTabPaths->plainTextEditFormulaWidthBefore->setPlainText("");
|
||||
uiTabPaths->plainTextEditFormulaWidthAfter->setPlainText("");
|
||||
uiTabPaths->plainTextEditFormulaWidthBefore->setPlainText(currentSeamAllowance);
|
||||
uiTabPaths->plainTextEditFormulaWidthAfter->setPlainText(currentSeamAllowance);
|
||||
uiTabPaths->comboBoxAngle->setCurrentIndex(-1);
|
||||
}
|
||||
uiTabPaths->comboBoxAngle->blockSignals(false);
|
||||
|
@ -2038,6 +2038,8 @@ void DialogSeamAllowance::EvalWidth()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogSeamAllowance::EvalWidthBefore()
|
||||
{
|
||||
if (uiTabPaths->checkBoxSeams->isChecked())
|
||||
{
|
||||
labelEditFormula = uiTabPaths->labelEditBefore;
|
||||
const QString postfix = UnitsToStr(qApp->patternUnit(), true);
|
||||
const QString formula = uiTabPaths->plainTextEditFormulaWidthBefore->toPlainText();
|
||||
|
@ -2046,11 +2048,14 @@ void DialogSeamAllowance::EvalWidthBefore()
|
|||
const QString formulaSABefore = GetFormulaFromUser(uiTabPaths->plainTextEditFormulaWidthBefore);
|
||||
UpdateNodeSABefore(formulaSABefore);
|
||||
EnableDefButton(uiTabPaths->pushButtonDefBefore, formulaSABefore);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogSeamAllowance::EvalWidthAfter()
|
||||
{
|
||||
if (uiTabPaths->checkBoxSeams->isChecked())
|
||||
{
|
||||
labelEditFormula = uiTabPaths->labelEditAfter;
|
||||
const QString postfix = UnitsToStr(qApp->patternUnit(), true);
|
||||
const QString formula = uiTabPaths->plainTextEditFormulaWidthAfter->toPlainText();
|
||||
|
@ -2059,6 +2064,7 @@ void DialogSeamAllowance::EvalWidthAfter()
|
|||
const QString formulaSAAfter = GetFormulaFromUser(uiTabPaths->plainTextEditFormulaWidthAfter);
|
||||
UpdateNodeSAAfter(formulaSAAfter);
|
||||
EnableDefButton(uiTabPaths->pushButtonDefAfter, formulaSAAfter);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -2118,19 +2124,25 @@ void DialogSeamAllowance::WidthChanged()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogSeamAllowance::WidthBeforeChanged()
|
||||
{
|
||||
if (uiTabPaths->checkBoxSeams->isChecked())
|
||||
{
|
||||
labelEditFormula = uiTabPaths->labelEditBefore;
|
||||
labelResultCalculation = uiTabPaths->labelResultBefore;
|
||||
const QString postfix = UnitsToStr(qApp->patternUnit(), true);
|
||||
ValFormulaChanged(flagFormulaBefore, uiTabPaths->plainTextEditFormulaWidthBefore, m_timerWidthBefore, postfix);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogSeamAllowance::WidthAfterChanged()
|
||||
{
|
||||
if (uiTabPaths->checkBoxSeams->isChecked())
|
||||
{
|
||||
labelEditFormula = uiTabPaths->labelEditAfter;
|
||||
labelResultCalculation = uiTabPaths->labelResultAfter;
|
||||
const QString postfix = UnitsToStr(qApp->patternUnit(), true);
|
||||
ValFormulaChanged(flagFormulaAfter, uiTabPaths->plainTextEditFormulaWidthAfter, m_timerWidthAfter, postfix);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user