Minor fixes for dialog Piece path.
--HG-- branch : release
This commit is contained in:
parent
7840bf04eb
commit
dce880e270
|
@ -348,7 +348,7 @@ void DialogPiecePath::NodeChanged(int index)
|
||||||
QString w2Formula = node.GetFormulaSAAfter();
|
QString w2Formula = node.GetFormulaSAAfter();
|
||||||
if (w2Formula != currentSeamAllowance)
|
if (w2Formula != currentSeamAllowance)
|
||||||
{
|
{
|
||||||
ui->pushButtonDefBefore->setEnabled(true);
|
ui->pushButtonDefAfter->setEnabled(true);
|
||||||
}
|
}
|
||||||
if (w2Formula.length() > 80)// increase height if needed.
|
if (w2Formula.length() > 80)// increase height if needed.
|
||||||
{
|
{
|
||||||
|
@ -458,12 +458,20 @@ void DialogPiecePath::PassmarkChanged(int index)
|
||||||
void DialogPiecePath::ReturnDefBefore()
|
void DialogPiecePath::ReturnDefBefore()
|
||||||
{
|
{
|
||||||
ui->plainTextEditFormulaWidthBefore->setPlainText(currentSeamAllowance);
|
ui->plainTextEditFormulaWidthBefore->setPlainText(currentSeamAllowance);
|
||||||
|
if (QPushButton* button = qobject_cast<QPushButton*>(sender()))
|
||||||
|
{
|
||||||
|
button->setEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogPiecePath::ReturnDefAfter()
|
void DialogPiecePath::ReturnDefAfter()
|
||||||
{
|
{
|
||||||
ui->plainTextEditFormulaWidthAfter->setPlainText(currentSeamAllowance);
|
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
|
bool flagFormula = false; // fake flag
|
||||||
Eval(formula, flagFormula, ui->labelResultBefore, postfix, false, true);
|
Eval(formula, flagFormula, ui->labelResultBefore, postfix, false, true);
|
||||||
|
|
||||||
|
if (formula != currentSeamAllowance)
|
||||||
|
{
|
||||||
|
ui->pushButtonDefBefore->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
UpdateNodeSABefore(GetFormulaSAWidthBefore());
|
UpdateNodeSABefore(GetFormulaSAWidthBefore());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,6 +596,11 @@ void DialogPiecePath::EvalWidthAfter()
|
||||||
bool flagFormula = false; // fake flag
|
bool flagFormula = false; // fake flag
|
||||||
Eval(formula, flagFormula, ui->labelResultAfter, postfix, false, true);
|
Eval(formula, flagFormula, ui->labelResultAfter, postfix, false, true);
|
||||||
|
|
||||||
|
if (formula != currentSeamAllowance)
|
||||||
|
{
|
||||||
|
ui->pushButtonDefAfter->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
UpdateNodeSABefore(GetFormulaSAWidthAfter());
|
UpdateNodeSABefore(GetFormulaSAWidthAfter());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="comboBoxNodes">
|
<widget class="QComboBox" name="comboBoxNodes">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user