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 <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2014-11-05 13:24:49 +01:00
parent 2a9c9f2d70
commit 61ae85631f

View File

@@ -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;