From 62d6463753d05ce70789f76f2198af27968c7ed8 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 12 Feb 2019 11:27:51 +0200 Subject: [PATCH] Fix more regressions in dialogs. --HG-- branch : develop --- .../dialogs/tools/piece/dialogpiecepath.cpp | 20 +++++++++++++++---- .../tools/piece/dialogseamallowance.cpp | 6 ++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp b/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp index 36a7a0a32..673b98ebf 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp @@ -598,7 +598,8 @@ void DialogPiecePath::PassmarkChanged(int index) //--------------------------------------------------------------------------------------------------------------------- void DialogPiecePath::ReturnDefBefore() { - ui->plainTextEditFormulaWidthBefore->setPlainText(currentSeamAllowance); + const QString def = qApp->TrVars()->FormulaToUser(currentSeamAllowance, qApp->Settings()->GetOsSeparator()); + ui->plainTextEditFormulaWidthBefore->setPlainText(def); if (QPushButton* button = qobject_cast(sender())) { button->setEnabled(false); @@ -608,7 +609,8 @@ void DialogPiecePath::ReturnDefBefore() //--------------------------------------------------------------------------------------------------------------------- void DialogPiecePath::ReturnDefAfter() { - ui->plainTextEditFormulaWidthAfter->setPlainText(currentSeamAllowance); + const QString def = qApp->TrVars()->FormulaToUser(currentSeamAllowance, qApp->Settings()->GetOsSeparator()); + ui->plainTextEditFormulaWidthAfter->setPlainText(def); if (QPushButton* button = qobject_cast(sender())) { button->setEnabled(false); @@ -782,7 +784,12 @@ void DialogPiecePath::EvalWidthBefore() ui->pushButtonDefBefore->setEnabled(true); } - UpdateNodeSABefore(formula); + Eval(formulaData, m_flagFormulaBefore); + + if (m_flagFormulaBefore) + { + UpdateNodeSABefore(formula); + } } else { @@ -812,7 +819,12 @@ void DialogPiecePath::EvalWidthAfter() ui->pushButtonDefAfter->setEnabled(true); } - UpdateNodeSAAfter(formula); + Eval(formulaData, m_flagFormulaAfter); + + if (m_flagFormulaAfter) + { + UpdateNodeSAAfter(formula); + } } else { diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp index c47af9ecf..1e33cfbff 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp @@ -1189,7 +1189,8 @@ void DialogSeamAllowance::NodeAngleChanged(int index) //--------------------------------------------------------------------------------------------------------------------- void DialogSeamAllowance::ReturnDefBefore() { - uiTabPaths->plainTextEditFormulaWidthBefore->setPlainText(currentSeamAllowance); + const QString def = qApp->TrVars()->FormulaToUser(currentSeamAllowance, qApp->Settings()->GetOsSeparator()); + uiTabPaths->plainTextEditFormulaWidthBefore->setPlainText(def); if (QPushButton* button = qobject_cast(sender())) { button->setEnabled(false); @@ -1199,7 +1200,8 @@ void DialogSeamAllowance::ReturnDefBefore() //--------------------------------------------------------------------------------------------------------------------- void DialogSeamAllowance::ReturnDefAfter() { - uiTabPaths->plainTextEditFormulaWidthAfter->setPlainText(currentSeamAllowance); + const QString def = qApp->TrVars()->FormulaToUser(currentSeamAllowance, qApp->Settings()->GetOsSeparator()); + uiTabPaths->plainTextEditFormulaWidthAfter->setPlainText(def); if (QPushButton* button = qobject_cast(sender())) { button->setEnabled(false);