diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index b64494d9b1..8588141550 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -540,6 +540,7 @@ void QuantitySpinBox::userInput(const QString & text) int pos = 0; QValidator::State state; Base::Quantity res = d->validateAndInterpret(tmp, pos, state); + res.setFormat(d->quantity.getFormat()); if (state == QValidator::Acceptable) { d->validInput = true; d->validStr = text; @@ -549,6 +550,7 @@ void QuantitySpinBox::userInput(const QString & text) tmp += QLatin1Char(' '); tmp += d->unitStr; Base::Quantity res2 = d->validateAndInterpret(tmp, pos, state); + res2.setFormat(d->quantity.getFormat()); if (state == QValidator::Acceptable) { d->validInput = true; d->validStr = tmp;