Salome HOME
Update copyright info (2010->2011)
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SpinBox.cxx
index 13b84b813d5f112480692a1e4591543728d3334e..d510599ef06fff6ea8389da3b7f6716b24ca267e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SpinBox.cxx
 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
@@ -65,7 +66,7 @@ void SMESHGUI_SpinBox::SetStep( double newStep )
 //=================================================================================
 void SMESHGUI_SpinBox::SetValue( double v )
 {
-  setValue(v);
+  setValue(valueFromText(textFromValue(v)));
   editor()->setCursorPosition( 0 );
 }
 
@@ -112,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
-  setDecimals(qAbs(precision));
+  setDecimals( 20 ); // qAbs(precision)
   setRange(min, max);
   setSingleStep( step );
   setDefaultValue( min );