diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 4b64ecc7b2..16f0113bbd 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -89,6 +89,11 @@ public: bool validate(QString& input, Base::Quantity& result) const { + // Do not accept empty strings because the parser will consider + // " unit" as "1 unit" which is not the desired behaviour (see #0004104) + if (input.isEmpty()) + return false; + bool success = false; QString tmp = input; int pos = 0;