diff --git a/app/gcompose/src/PropertyWidgets.cpp b/app/gcompose/src/PropertyWidgets.cpp index f12fd29..9d13fea 100644 --- a/app/gcompose/src/PropertyWidgets.cpp +++ b/app/gcompose/src/PropertyWidgets.cpp @@ -45,7 +45,7 @@ double parseWithUnits(const QString& text, double* factorOut, QString* suffixOut double num = match.captured(1).toDouble(); QString unit = match.captured(3); - double factor = 1.0; + double factor = factorOut ? *factorOut : 1.0; if (!unit.isEmpty()) { QString u = unit.startsWith('_') ? unit.mid(1) : unit; @@ -101,10 +101,6 @@ void UnitLineEdit::onEditingFinished() { double factor = m_Factor; QString suffix = m_Suffix; double parsedVal = parseWithUnits(text(), &factor, &suffix); - if (!suffix.isEmpty()) { - m_Suffix = suffix; - m_Factor = factor; - } if (m_IsInteger) { parsedVal = std::round(parsedVal); }