From 47bb4de2a980164a81f443bfecfbe37f5b770c9e Mon Sep 17 00:00:00 2001 From: san Date: Fri, 12 Nov 2010 13:28:06 +0000 Subject: [PATCH] Added checking for visibility of watched widget before setting focus to it. --- src/Qtx/QtxSearchTool.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.39.2