From: mpv Date: Mon, 15 Sep 2014 13:43:30 +0000 (+0400) Subject: Fix for crash in Release mode X-Git-Tag: V_0.4.4~48^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=00539c245cd740157cfe2258d3e17337c86c963c;p=modules%2Fshaper.git Fix for crash in Release mode --- diff --git a/src/ModuleBase/ModuleBase_DoubleSpinBox.cpp b/src/ModuleBase/ModuleBase_DoubleSpinBox.cpp index 8f807737f..d85ad9897 100644 --- a/src/ModuleBase/ModuleBase_DoubleSpinBox.cpp +++ b/src/ModuleBase/ModuleBase_DoubleSpinBox.cpp @@ -62,11 +62,13 @@ ModuleBase_DoubleSpinBox::ModuleBase_DoubleSpinBox(QWidget* parent, int thePreci loc.setNumberOptions(loc.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator); setLocale(loc); + // MPV 15/09/2014: this must be set before setDecimals; otherwise in release mode setDecimals may crash + myPrecision = thePrecision; + // Use precision equal to default Qt decimals // it's necessary to set decimals before the range setting, // by default Qt rounds boundaries to 2 decimals at setRange setDecimals(thePrecision); - myPrecision = thePrecision; connect(lineEdit(), SIGNAL(textChanged( const QString& )), this, SLOT(onTextChanged( const QString& )));