Fix the formula wizard crash.

This commit is contained in:
Roman Telezhynskyi 2021-02-10 19:22:59 +02:00
parent c10611605b
commit d2c6ebba21

View File

@ -538,8 +538,7 @@ void DialogEditWrongFormula::InitVariables()
void DialogEditWrongFormula::SetDescription(const QString &name, qreal value, bool specialUnits, void DialogEditWrongFormula::SetDescription(const QString &name, qreal value, bool specialUnits,
const QString &description) const QString &description)
{ {
const QString unit = specialUnits ? degreeSymbol const QString unit = specialUnits ? degreeSymbol : ' ' + postfix;
: " " + UnitsToStr(VAbstractValApplication::VApp()->patternUnits(), true);
const QString desc = QStringLiteral("%1(%2%3) - %4").arg(name).arg(value).arg(unit, description); const QString desc = QStringLiteral("%1(%2%3) - %4").arg(name).arg(value).arg(unit, description);
ui->labelDescription->setText(desc); ui->labelDescription->setText(desc);
} }