From: spo Date: Wed, 3 Jun 2015 07:28:09 +0000 (+0300) Subject: Issue #586: Paprameter name suffixed by a digit -- Use localization decimal point... X-Git-Tag: V_1.2.1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd8719dee6b9f907c30ba4a9d80258ee20dacd2f;p=modules%2Fshaper.git Issue #586: Paprameter name suffixed by a digit -- Use localization decimal point for matching floats. --- diff --git a/src/ModuleBase/ModuleBase_ParamSpinBox.cpp b/src/ModuleBase/ModuleBase_ParamSpinBox.cpp index dd3eebd30..5e59599a3 100644 --- a/src/ModuleBase/ModuleBase_ParamSpinBox.cpp +++ b/src/ModuleBase/ModuleBase_ParamSpinBox.cpp @@ -8,8 +8,9 @@ #include #include -#include +#include #include +#include #include #include @@ -164,8 +165,9 @@ bool ModuleBase_ParamSpinBox::hasVariable() const bool ModuleBase_ParamSpinBox::hasVariable(const QString& theText) const { - //QRegExp varNameMask("[-+]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?"); //This row causes problem with input in sketcher (circle) - QRegExp varNameMask("[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?"); + QString aPattern = QString("[-+]?[0-9]*[%1]?[0-9]+([eE][-+]?[0-9]+)?") + .arg(QLocale::system().decimalPoint()); + QRegExp varNameMask(aPattern); return !varNameMask.exactMatch(theText); }