From: akl Date: Fri, 25 Apr 2008 11:35:16 +0000 (+0000) Subject: Set 'CorrectToNearestValue' mode as default correction mode. X-Git-Tag: V5_0_0~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9c44f2a07867dfb9c82d62ec9c75e18c797f587c;p=modules%2Fgui.git Set 'CorrectToNearestValue' mode as default correction mode. --- diff --git a/src/Qtx/QtxIntSpinBox.cxx b/src/Qtx/QtxIntSpinBox.cxx index 175a297ae..b4cff2238 100755 --- a/src/Qtx/QtxIntSpinBox.cxx +++ b/src/Qtx/QtxIntSpinBox.cxx @@ -57,6 +57,7 @@ QtxIntSpinBox::QtxIntSpinBox( QWidget* parent ) : QSpinBox( parent ), myCleared( false ) { + setCorrectionMode( QSpinBox::CorrectToNearestValue ); connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); } @@ -79,6 +80,7 @@ QtxIntSpinBox::QtxIntSpinBox( int min, int max, int step, QWidget* parent ) setMinimum( min ); setMaximum( max ); setSingleStep( step ); + setCorrectionMode( QSpinBox::CorrectToNearestValue ); connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) );