diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index bbd070470..19c5e9eda 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -450,16 +450,17 @@ void InputField::setHistorySize(int i) void InputField::selectNumber(void) { - QByteArray str = text().toLatin1(); + QString input = text(); + fixup(input); + QByteArray str = input.toLatin1(); unsigned int i = 0; - Base::Console().Message("%i", locale().negativeSign().toAscii()); for (QByteArray::iterator it = str.begin(); it != str.end(); ++it) { if (*it >= '0' && *it <= '9') i++; else if (*it == ',' || *it == '.') i++; - else if (*it == '-' || *it == locale().negativeSign().toAscii()) + else if (*it == '-' ) i++; else // any non-number character break; diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 88f54fcc3..47cf3b03e 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -326,7 +326,9 @@ void QuantitySpinBox::clear() void QuantitySpinBox::selectNumber() { - QByteArray str = lineEdit()->text().toLatin1(); + QString input = lineEdit()->text(); + fixup(input); + QByteArray str = input.toLatin1(); unsigned int i = 0; for (QByteArray::iterator it = str.begin(); it != str.end(); ++it) { @@ -334,7 +336,7 @@ void QuantitySpinBox::selectNumber() i++; else if (*it == ',' || *it == '.') i++; - else if (*it == '-' || *it == locale().negativeSign().toAscii()) + else if (*it == '-' ) i++; else // any non-number character break;