From 0eb28c906a2cb978f2c7eecc8b00e07511c473ea Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 21 Dec 2005 07:16:12 +0000 Subject: [PATCH] Bug fix for SSPP10924 --- src/Qtx/QtxDblSpinBox.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Qtx/QtxDblSpinBox.cxx b/src/Qtx/QtxDblSpinBox.cxx index 5b4903fc5..d92cecf0f 100755 --- a/src/Qtx/QtxDblSpinBox.cxx +++ b/src/Qtx/QtxDblSpinBox.cxx @@ -271,6 +271,9 @@ void QtxDblSpinBox::selectAll() bool QtxDblSpinBox::eventFilter( QObject* o, QEvent* e ) { + if ( e->type() == QEvent::FocusOut && o == editor() ) + updateDisplay(); + if ( !myCleared || o != editor() || !editor()->text().stripWhiteSpace().isEmpty() ) return QSpinBox::eventFilter( o, e ); @@ -319,6 +322,8 @@ void QtxDblSpinBox::updateDisplay() else editor()->setSelection( prefix().length(), editor()->text().length() - prefix().length() - suffix().length() ); } + else + editor()->setCursorPosition( 0 ); myBlocked = isBlock; } -- 2.39.2