From: san Date: Fri, 12 Nov 2010 13:28:06 +0000 (+0000) Subject: Added checking for visibility of watched widget before setting focus to it. X-Git-Tag: V5_1_10~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=47bb4de2a980164a81f443bfecfbe37f5b770c9e;p=modules%2Fgui.git Added checking for visibility of watched widget before setting focus to it. --- diff --git a/src/Qtx/QtxSearchTool.cxx b/src/Qtx/QtxSearchTool.cxx index e70f6e89c..dbb40df12 100644 --- a/src/Qtx/QtxSearchTool.cxx +++ b/src/Qtx/QtxSearchTool.cxx @@ -676,7 +676,7 @@ bool QtxSearchTool::event( QEvent* e ) if ( ke->key() == Qt::Key_Escape ) hide(); } - else if ( e->type() == QEvent::Hide && myWatched ) + else if ( e->type() == QEvent::Hide && myWatched && myWatched->isVisible() ) { myWatched->setFocus(); }