Minor fixes for dialog Piece path.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2017-04-25 13:55:35 +03:00
parent 7840bf04eb
commit dce880e270
2 changed files with 20 additions and 2 deletions

View file

@ -348,7 +348,7 @@ void DialogPiecePath::NodeChanged(int index)
QString w2Formula = node.GetFormulaSAAfter();
if (w2Formula != currentSeamAllowance)
{
ui->pushButtonDefBefore->setEnabled(true);
ui->pushButtonDefAfter->setEnabled(true);
}
if (w2Formula.length() > 80)// increase height if needed.
{
@ -458,12 +458,20 @@ void DialogPiecePath::PassmarkChanged(int index)
void DialogPiecePath::ReturnDefBefore()
{
ui->plainTextEditFormulaWidthBefore->setPlainText(currentSeamAllowance);
if (QPushButton* button = qobject_cast<QPushButton*>(sender()))
{
button->setEnabled(false);
}
}
//---------------------------------------------------------------------------------------------------------------------
void DialogPiecePath::ReturnDefAfter()
{
ui->plainTextEditFormulaWidthAfter->setPlainText(currentSeamAllowance);
if (QPushButton* button = qobject_cast<QPushButton*>(sender()))
{
button->setEnabled(false);
}
}
//---------------------------------------------------------------------------------------------------------------------
@ -571,6 +579,11 @@ void DialogPiecePath::EvalWidthBefore()
bool flagFormula = false; // fake flag
Eval(formula, flagFormula, ui->labelResultBefore, postfix, false, true);
if (formula != currentSeamAllowance)
{
ui->pushButtonDefBefore->setEnabled(true);
}
UpdateNodeSABefore(GetFormulaSAWidthBefore());
}
@ -583,6 +596,11 @@ void DialogPiecePath::EvalWidthAfter()
bool flagFormula = false; // fake flag
Eval(formula, flagFormula, ui->labelResultAfter, postfix, false, true);
if (formula != currentSeamAllowance)
{
ui->pushButtonDefAfter->setEnabled(true);
}
UpdateNodeSABefore(GetFormulaSAWidthAfter());
}

View file

@ -326,7 +326,7 @@
<item>
<widget class="QComboBox" name="comboBoxNodes">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
</widget>
</item>