From 44ddca544caa61f290d502fdf62f5bdbaf2b4f34 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 22 Oct 2019 17:25:33 +0200 Subject: [PATCH] Fix focusing of already open output pane from separate window If the focus is in a separate window and the shortcut for an already open output pane is triggered, we should set the focus there and activate the window, not close the output pane. Fixes: QTCREATORBUG-20083 Change-Id: Ia9f9fbe137c9ac1ad3e9d148cc410ca093275916 Reviewed-by: Christian Stenger --- src/plugins/coreplugin/outputpanemanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp index 31af49521fa..00201293827 100644 --- a/src/plugins/coreplugin/outputpanemanager.cpp +++ b/src/plugins/coreplugin/outputpanemanager.cpp @@ -513,7 +513,8 @@ void OutputPaneManager::shortcutTriggered(int idx) // then just give it focus. int current = currentIndex(); if (OutputPanePlaceHolder::isCurrentVisible() && current == idx) { - if (!outputPane->hasFocus() && outputPane->canFocus()) { + if ((!m_outputWidgetPane->isActiveWindow() || !outputPane->hasFocus()) + && outputPane->canFocus()) { outputPane->setFocus(); ICore::raiseWindow(m_outputWidgetPane); } else {