Fixed issue #939. Calling Formula Wizard through property explorer doesn't
refresh formula. --HG-- branch : release
This commit is contained in:
parent
22d410fdd6
commit
17760219ea
|
@ -11,6 +11,7 @@
|
||||||
- [#930] Valentina doesn't update translation for variables after dynamic language switch.
|
- [#930] Valentina doesn't update translation for variables after dynamic language switch.
|
||||||
- [#931] Variable translation for Greek and Chinese are broken.
|
- [#931] Variable translation for Greek and Chinese are broken.
|
||||||
- [#938] Dialog Seam Allowance doesn't block user from saving broken formula.
|
- [#938] Dialog Seam Allowance doesn't block user from saving broken formula.
|
||||||
|
- [#939] Calling Formula Wizard through property explorer doesn't refresh formula.
|
||||||
|
|
||||||
# Version 0.6.1 October 23, 2018
|
# Version 0.6.1 October 23, 2018
|
||||||
- [#885] Regression. Broken support for multi size measurements.
|
- [#885] Regression. Broken support for multi size measurements.
|
||||||
|
|
|
@ -85,8 +85,8 @@ void VFormulaPropertyEditor::SetFormula(const VFormula& formula)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VFormulaPropertyEditor::onToolButtonClicked()
|
void VFormulaPropertyEditor::onToolButtonClicked()
|
||||||
{
|
{
|
||||||
DialogEditWrongFormula* tmpWidget = new DialogEditWrongFormula(formula.getData(), formula.getToolId(),
|
QScopedPointer<DialogEditWrongFormula> tmpWidget(new DialogEditWrongFormula(formula.getData(), formula.getToolId(),
|
||||||
qApp->getMainWindow());
|
qApp->getMainWindow()));
|
||||||
tmpWidget->setCheckZero(formula.getCheckZero());
|
tmpWidget->setCheckZero(formula.getCheckZero());
|
||||||
tmpWidget->setPostfix(formula.getPostfix());
|
tmpWidget->setPostfix(formula.getPostfix());
|
||||||
tmpWidget->SetFormula(formula.GetFormula(FormulaType::FromUser));
|
tmpWidget->SetFormula(formula.GetFormula(FormulaType::FromUser));
|
||||||
|
@ -94,11 +94,10 @@ void VFormulaPropertyEditor::onToolButtonClicked()
|
||||||
if (tmpWidget->exec() == QDialog::Accepted)
|
if (tmpWidget->exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
formula.SetFormula(tmpWidget->GetFormula(), FormulaType::ToUser);
|
formula.SetFormula(tmpWidget->GetFormula(), FormulaType::ToUser);
|
||||||
|
formula.Eval();
|
||||||
TextLabel->setText(formula.getStringValue());
|
TextLabel->setText(formula.getStringValue());
|
||||||
delete tmpWidget;
|
|
||||||
emit dataChangedByUser(formula, this);
|
emit dataChangedByUser(formula, this);
|
||||||
VPE::UserChangeEvent *event = new VPE::UserChangeEvent();
|
QCoreApplication::postEvent(this, new VPE::UserChangeEvent());
|
||||||
QCoreApplication::postEvent ( this, event );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user