]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Bug fix for SSPP10924
authorstv <stv@opencascade.com>
Wed, 21 Dec 2005 07:16:12 +0000 (07:16 +0000)
committerstv <stv@opencascade.com>
Wed, 21 Dec 2005 07:16:12 +0000 (07:16 +0000)
src/Qtx/QtxDblSpinBox.cxx

index 5b4903fc54261283ac6fd264f05b2aeabb1f2062..d92cecf0f2edb91c9eb18a902c53503201e1426d 100755 (executable)
@@ -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;
 }