-// 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
//
// 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.
//=================================================================================
void SMESHGUI_SpinBox::SetValue( double v )
{
- setValue(v);
+ setValue(valueFromText(textFromValue(v)));
editor()->setCursorPosition( 0 );
}
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 );