Skip to content
Browse files

Spin box: fix input of double values in locales with non-point decima…

…l separator
  • Loading branch information
wonder-sk committed Oct 16, 2017
1 parent 54f8825 commit c176a8bfb0f7f25edea15069318f769e7c9c82bf
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/expression/qgsexpression.cpp
@@ -471,7 +471,9 @@ double QgsExpression::evaluateToDouble( const QString &text, const double fallba
bool ok;
//first test if text is directly convertible to double
double convertedValue = text.toDouble( &ok );
// use system locale: e.g. in German locale, user is presented with numbers "1,23" instead of "1.23" in C locale
// so we also want to allow user to rewrite it to "5,23" and it is still accepted
double convertedValue = QLocale::system().toDouble( text, &ok );
if ( ok )
return convertedValue;

0 comments on commit c176a8b

Please sign in to comment.
You can’t perform that action at this time.