diff options
-rw-r--r-- | src/plugins/coreplugin/outputpane.cpp | 4 | ||||
-rw-r--r-- | src/plugins/coreplugin/outputpanemanager.cpp | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/outputpane.cpp b/src/plugins/coreplugin/outputpane.cpp index 67e57448aa..81473320bb 100644 --- a/src/plugins/coreplugin/outputpane.cpp +++ b/src/plugins/coreplugin/outputpane.cpp @@ -183,6 +183,10 @@ void OutputPanePlaceHolder::showEvent(QShowEvent *) d->m_initialized = true; setHeight(Internal::OutputPaneManager::outputPaneHeightSetting()); } + if (OutputPanePlaceHolderPrivate::m_current == this) { + Internal::OutputPaneManager *om = Internal::OutputPaneManager::instance(); + om->updateStatusButtons(true); + } } OutputPanePlaceHolder *OutputPanePlaceHolder::getCurrent() diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp index a249686f9e..e9390cb11d 100644 --- a/src/plugins/coreplugin/outputpanemanager.cpp +++ b/src/plugins/coreplugin/outputpanemanager.cpp @@ -575,7 +575,12 @@ void OutputPaneManager::readSettings() } settings->endArray(); - m_outputPaneHeightSetting = settings->value(QLatin1String("OutputPanePlaceHolder/Height"), 0).toInt(); + m_outputPaneHeightSetting + = settings->value(QLatin1String("OutputPanePlaceHolder/Height"), 0).toInt(); + const int currentIdx + = settings->value(QLatin1String("OutputPanePlaceHolder/CurrentIndex"), 0).toInt(); + if (QTC_GUARD(currentIdx >= 0 && currentIdx < g_outputPanes.size())) + setCurrentIndex(currentIdx); } void OutputPaneManager::slotNext() @@ -682,7 +687,8 @@ void OutputPaneManager::setCurrentIndex(int idx) OutputPaneData &data = g_outputPanes[idx]; IOutputPane *pane = data.pane; data.button->show(); - pane->visibilityChanged(true); + if (OutputPanePlaceHolder::isCurrentVisible()) + pane->visibilityChanged(true); bool canNavigate = pane->canNavigate(); m_prevAction->setEnabled(canNavigate && pane->canPrevious()); @@ -737,6 +743,7 @@ void OutputPaneManager::saveSettings() const if (OutputPanePlaceHolder *curr = OutputPanePlaceHolder::getCurrent()) heightSetting = curr->nonMaximizedSize(); settings->setValue(QLatin1String("OutputPanePlaceHolder/Height"), heightSetting); + settings->setValue(QLatin1String("OutputPanePlaceHolder/CurrentIndex"), currentIndex()); } void OutputPaneManager::clearPage() |