From: stv Date: Fri, 10 Jun 2005 07:42:44 +0000 (+0000) Subject: Bug fix: When last window closed active window pointer don't nullifyed. X-Git-Tag: T3_0_0_a3~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fee6b92d68419c689ba78333e4d0525fe37cf963;p=modules%2Fgui.git Bug fix: When last window closed active window pointer don't nullifyed. --- diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index 492044ab6..2ca7b819a 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -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 ) ); }