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 <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2019-10-22 17:25:33 +02:00
parent bf698f5a2f
commit 44ddca544c

View File

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