Fix more regressions in dialogs.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-02-12 11:27:51 +02:00
parent 3e821a7b83
commit 62d6463753
2 changed files with 20 additions and 6 deletions

View File

@ -598,7 +598,8 @@ void DialogPiecePath::PassmarkChanged(int index)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogPiecePath::ReturnDefBefore() 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<QPushButton*>(sender())) if (QPushButton* button = qobject_cast<QPushButton*>(sender()))
{ {
button->setEnabled(false); button->setEnabled(false);
@ -608,7 +609,8 @@ void DialogPiecePath::ReturnDefBefore()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogPiecePath::ReturnDefAfter() 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<QPushButton*>(sender())) if (QPushButton* button = qobject_cast<QPushButton*>(sender()))
{ {
button->setEnabled(false); button->setEnabled(false);
@ -782,8 +784,13 @@ void DialogPiecePath::EvalWidthBefore()
ui->pushButtonDefBefore->setEnabled(true); ui->pushButtonDefBefore->setEnabled(true);
} }
Eval(formulaData, m_flagFormulaBefore);
if (m_flagFormulaBefore)
{
UpdateNodeSABefore(formula); UpdateNodeSABefore(formula);
} }
}
else else
{ {
ChangeColor(ui->labelEditBefore, OkColor(this)); ChangeColor(ui->labelEditBefore, OkColor(this));
@ -812,8 +819,13 @@ void DialogPiecePath::EvalWidthAfter()
ui->pushButtonDefAfter->setEnabled(true); ui->pushButtonDefAfter->setEnabled(true);
} }
Eval(formulaData, m_flagFormulaAfter);
if (m_flagFormulaAfter)
{
UpdateNodeSAAfter(formula); UpdateNodeSAAfter(formula);
} }
}
else else
{ {
ChangeColor(ui->labelEditAfter, OkColor(this)); ChangeColor(ui->labelEditAfter, OkColor(this));

View File

@ -1189,7 +1189,8 @@ void DialogSeamAllowance::NodeAngleChanged(int index)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogSeamAllowance::ReturnDefBefore() 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<QPushButton*>(sender())) if (QPushButton* button = qobject_cast<QPushButton*>(sender()))
{ {
button->setEnabled(false); button->setEnabled(false);
@ -1199,7 +1200,8 @@ void DialogSeamAllowance::ReturnDefBefore()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogSeamAllowance::ReturnDefAfter() 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<QPushButton*>(sender())) if (QPushButton* button = qobject_cast<QPushButton*>(sender()))
{ {
button->setEnabled(false); button->setEnabled(false);