From d5e20ff8ccd5cf937b0675a7505869680234eed7 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 2 Feb 2011 06:42:04 +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