From: vsr Date: Wed, 2 Feb 2011 06:42:04 +0000 (+0000) Subject: Fix problem for OSCAR (avoid resetting value on focus leaving) X-Git-Tag: V5_1_4_patch03 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV5_1_4_BR;p=modules%2Fgui.git Fix problem for OSCAR (avoid resetting value on focus leaving) --- diff --git a/src/QDS/QDS_SpinBoxDbl.cxx b/src/QDS/QDS_SpinBoxDbl.cxx index f6f948923..5d0a308da 100644 --- a/src/QDS/QDS_SpinBoxDbl.cxx +++ b/src/QDS/QDS_SpinBoxDbl.cxx @@ -70,9 +70,9 @@ QString QDS_SpinBoxDbl::getString() const QtxDoubleSpinBox* sb = spinBox(); if ( sb && !sb->isCleared() ) { - bool hasFocus = sb->hasFocus(); + /*bool hasFocus = sb->hasFocus(); if ( hasFocus ) - sb->clearFocus(); + sb->clearFocus();*/ res = sb->text(); if ( !sb->suffix().isEmpty() ) @@ -80,8 +80,8 @@ QString QDS_SpinBoxDbl::getString() const if ( !sb->prefix().isEmpty() ) res.remove( res.indexOf( sb->prefix() ), sb->prefix().length() ); - if ( hasFocus ) - sb->setFocus(); + /*if ( hasFocus ) + sb->setFocus();*/ } return res; @@ -195,4 +195,4 @@ void QDS_SpinBoxDbl::unitSystemChanged( const QString& system ) sb->setSingleStep( .1 ); sb->setMinimum( minValue().isEmpty() ? -DBL_MAX : minValue().toDouble() ); sb->setMaximum( maxValue().isEmpty() ? DBL_MAX : maxValue().toDouble() ); -} +} \ No newline at end of file