From: stv Date: Wed, 21 Dec 2005 07:16:12 +0000 (+0000) Subject: Bug fix for SSPP10924 X-Git-Tag: T_Before_Join_BR_3_1_0deb~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0eb28c906a2cb978f2c7eecc8b00e07511c473ea;p=modules%2Fgui.git Bug fix for SSPP10924 --- 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; }