Fixed issue #939. Calling Formula Wizard through property explorer doesn't

refresh formula.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2019-02-07 19:22:39 +02:00
parent 22d410fdd6
commit 17760219ea
2 changed files with 5 additions and 5 deletions

View File

@ -11,6 +11,7 @@
- [#930] Valentina doesn't update translation for variables after dynamic language switch.
- [#931] Variable translation for Greek and Chinese are broken.
- [#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
- [#885] Regression. Broken support for multi size measurements.

View File

@ -85,8 +85,8 @@ void VFormulaPropertyEditor::SetFormula(const VFormula& formula)
//---------------------------------------------------------------------------------------------------------------------
void VFormulaPropertyEditor::onToolButtonClicked()
{
DialogEditWrongFormula* tmpWidget = new DialogEditWrongFormula(formula.getData(), formula.getToolId(),
qApp->getMainWindow());
QScopedPointer<DialogEditWrongFormula> tmpWidget(new DialogEditWrongFormula(formula.getData(), formula.getToolId(),
qApp->getMainWindow()));
tmpWidget->setCheckZero(formula.getCheckZero());
tmpWidget->setPostfix(formula.getPostfix());
tmpWidget->SetFormula(formula.GetFormula(FormulaType::FromUser));
@ -94,11 +94,10 @@ void VFormulaPropertyEditor::onToolButtonClicked()
if (tmpWidget->exec() == QDialog::Accepted)
{
formula.SetFormula(tmpWidget->GetFormula(), FormulaType::ToUser);
formula.Eval();
TextLabel->setText(formula.getStringValue());
delete tmpWidget;
emit dataChangedByUser(formula, this);
VPE::UserChangeEvent *event = new VPE::UserChangeEvent();
QCoreApplication::postEvent ( this, event );
QCoreApplication::postEvent(this, new VPE::UserChangeEvent());
}
}