diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 646efe9290..a6df1f9cc5 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -140,21 +140,35 @@ public: goto end; } else if (len > 1) { - const int dec = copy.indexOf(locale.decimalPoint()); + int dec = copy.indexOf(locale.decimalPoint()); if (dec != -1) { + // fix two directly consecutive decimal points immediately if (dec + 1 < copy.size() && copy.at(dec + 1) == locale.decimalPoint() && pos == dec + 1) { copy.remove(dec + 1, 1); } - else if (copy.indexOf(locale.decimalPoint(), dec + 1) != -1) { - // trying to add a second decimal point is not allowed - state = QValidator::Invalid; - goto end; - } - for (int i=dec + 1; i