From ed1e438d489d37141fb10471a37b2709c3c8130d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 3 Jun 2019 12:19:12 +0300 Subject: [PATCH] Fix crash. If intial formula value is incorrect calling a formula wizard will call an exception and the aplication will terminate. --HG-- branch : develop --- src/libs/vpatterndb/vformula.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/vpatterndb/vformula.cpp b/src/libs/vpatterndb/vformula.cpp index 490c7afa1..0be1b9f55 100644 --- a/src/libs/vpatterndb/vformula.cpp +++ b/src/libs/vpatterndb/vformula.cpp @@ -94,7 +94,7 @@ QString VFormula::GetFormula(FormulaType type) const { if (type == FormulaType::ToUser) { - return qApp->TrVars()->TryFormulaToUser(d->formula, qApp->Settings()->GetOsSeparator()); + return VTranslateVars::TryFormulaToUser(d->formula, qApp->Settings()->GetOsSeparator()); } else { @@ -109,7 +109,7 @@ void VFormula::SetFormula(const QString &value, FormulaType type) { if (type == FormulaType::FromUser) { - d->formula = qApp->TrVars()->FormulaFromUser(value, qApp->Settings()->GetOsSeparator()); + d->formula = VTranslateVars::TryFormulaFromUser(value, qApp->Settings()->GetOsSeparator()); } else {