Salome HOME
EDF 1575 SMESH: Filters and precision preferences
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SpinBox.cxx
index d34f9f8d7855666f31adb56b4139ffc120eda82a..03d53d8302577b06249cd306fba53a677fe72688 100644 (file)
@@ -66,7 +66,7 @@ void SMESHGUI_SpinBox::SetStep( double newStep )
 //=================================================================================
 void SMESHGUI_SpinBox::SetValue( double v )
 {
 //=================================================================================
 void SMESHGUI_SpinBox::SetValue( double v )
 {
-  setValue(v);
+  setValue(valueFromText(textFromValue(v)));
   editor()->setCursorPosition( 0 );
 }
 
   editor()->setCursorPosition( 0 );
 }
 
@@ -113,7 +113,7 @@ void SMESHGUI_SpinBox::RangeStepAndValidator( double min,
   setPrecision(precision); // PAL8769. Minus is for using 'g' double->string conversion specifier,
   //                          see QtxDoubleSpinBox::mapValueToText( double v )
   //                          san: this can be achieved using preferences
   setPrecision(precision); // PAL8769. Minus is for using 'g' double->string conversion specifier,
   //                          see QtxDoubleSpinBox::mapValueToText( double v )
   //                          san: this can be achieved using preferences
-  setDecimals(qAbs(precision));
+  setDecimals( 20 ); // qAbs(precision)
   setRange(min, max);
   setSingleStep( step );
   setDefaultValue( min );
   setRange(min, max);
   setSingleStep( step );
   setDefaultValue( min );