From 9c44f2a07867dfb9c82d62ec9c75e18c797f587c Mon Sep 17 00:00:00 2001 From: akl Date: Fri, 25 Apr 2008 11:35:16 +0000 Subject: [PATCH] Set 'CorrectToNearestValue' mode as default correction mode. --- src/Qtx/QtxIntSpinBox.cxx | 2 ++ 1 file changed, 2 insertions(+) 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& ) ) ); -- 2.39.2