From 6007ebab5bfeaa24e769b32e7bc0cb420d682517 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 3 Feb 2011 08:58:45 +0000 Subject: [PATCH] Fix problem for OSCAR (avoid resetting value on focus leaving) --- src/QDS/QDS_SpinBoxDbl.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 -- 2.39.2