Salome HOME
Modify default icon for the module
[modules/gui.git] / src / Qtx / QtxWorkstack.cxx
index 492044ab63358c492707b04c96b37b22c10ab2c6..2ca7b819ab1edbfa2565d23a6fb8bd3d62c12508 100644 (file)
@@ -244,9 +244,12 @@ void QtxWorkstack::onDeactivated( QtxWorkstackArea* area )
   if ( idx == -1 )
     return;
 
+  myWin = 0;
+  myArea = 0;
+
   QtxWorkstackArea* newArea = neighbourArea( area );
-  if ( newArea )
-    newArea->setFocus();
+  if ( newArea && newArea->activeWidget() )
+    newArea->activeWidget()->setFocus();
 
   QApplication::postEvent( this, new QCustomEvent( QEvent::User ) );
 }