Salome HOME
PAL8536. In SMESHGUI_doubleParameter::InitializeWidget() allow going down to _bottom
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_aParameter.cxx
index 37a2f329b0cd350c2174e500556da9493792f565..7ba5e20dc774991f46940b9eccd2e857a4e2e84e 100644 (file)
@@ -33,8 +33,6 @@
 
 #include "QAD_SpinBoxDbl.h"
 
-#include <utilities.h>
-
 SMESHGUI_aParameter::~SMESHGUI_aParameter() {}
 
 //=================================================================================
@@ -117,8 +115,9 @@ void SMESHGUI_doubleParameter::InitializeWidget( QWidget* theQWidget) const
 {
   QAD_SpinBoxDbl * aSpin = dynamic_cast< QAD_SpinBoxDbl *>( theQWidget );
   if ( aSpin ) {
+    aSpin->setPrecision( _decimals );
+    aSpin->setDblPrecision( _bottom );
     aSpin->setRange( _bottom, _top );
-    ((QDoubleValidator*)(aSpin->validator()))->setRange( _bottom, _top, _decimals );
     aSpin->setValue( _initValue );
     aSpin->setLineStep( _step );
   }
@@ -139,7 +138,6 @@ SMESHGUI_strParameter::SMESHGUI_strParameter(const QString& theInitValue,
      :SMESHGUI_aParameter(theLabel),
       _initValue( theInitValue )
 {
-  MESSAGE("SMESHGUI_strParameter::SMESHGUI_strParameter")
 }
 SMESHGUI_aParameter::Type SMESHGUI_strParameter::GetType() const
 {
@@ -160,7 +158,6 @@ bool SMESHGUI_strParameter::GetNewText( QString & theValue ) const
 }
 void SMESHGUI_strParameter::InitializeWidget( QWidget* theQWidget) const
 {
-  MESSAGE("SMESHGUI_strParameter::InitializeWidget")
   QTextEdit * anEdit = dynamic_cast< QTextEdit *>( theQWidget );
   if ( anEdit ) {
     anEdit->setText( _initValue );
@@ -168,7 +165,6 @@ void SMESHGUI_strParameter::InitializeWidget( QWidget* theQWidget) const
 }
 void SMESHGUI_strParameter::TakeValue( QWidget* theQWidget)
 {
-  MESSAGE("SMESHGUI_strParameter::TakeValue")
   QTextEdit * anEdit = dynamic_cast< QTextEdit *>( theQWidget );
   if ( anEdit )
     _newValue = anEdit->text();