From 61ae85631f7a6fe8507fd1efab1e73e8178702c7 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 5 Nov 2014 13:24:49 +0100 Subject: [PATCH] Escape key: Fix more cases of closing find tool bar 1. Close find, but not output panes, if pressing ESC while focus is in the editor that has the find tool bar 2. If find tool bar is visible anywhere else (e.g. in the navigation panes), close it together with the output panes (it was not hidden at all in that case). Change-Id: Ia91900144c9f31ec53d1a046aa2972ac22b1a6b6 Reviewed-by: Daniel Teske --- src/plugins/coreplugin/editormanager/editormanager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 4dc85dbfa11..0bd10af7ae1 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -679,8 +679,7 @@ void EditorManagerPrivate::doEscapeKeyFocusMoveMagic() if (findPane && findPane->isVisible() && findPane->isUsedByWidget(focus)) { findPane->hide(); stuffHidden = true; - } - if (!( editorViewVisible && !editorViewActive && editorView->window() == activeWindow )) { + } else if (!( editorViewVisible && !editorViewActive && editorView->window() == activeWindow )) { QWidget *outputPane = OutputPanePlaceHolder::getCurrent(); if (outputPane && outputPane->isVisible() && outputPane->window() == activeWindow) { OutputPaneManager::instance()->slotHide(); @@ -691,6 +690,10 @@ void EditorManagerPrivate::doEscapeKeyFocusMoveMagic() RightPaneWidget::instance()->setShown(false); stuffHidden = true; } + if (findPane && findPane->isVisible() && findPane->window() == activeWindow) { + findPane->hide(); + stuffHidden = true; + } } if (stuffHidden) return;