diff --git a/src/plugins/coreplugin/loggingviewer.cpp b/src/plugins/coreplugin/loggingviewer.cpp index 1cb95ae8b7f..0ee6c0b7f42 100644 --- a/src/plugins/coreplugin/loggingviewer.cpp +++ b/src/plugins/coreplugin/loggingviewer.cpp @@ -1100,6 +1100,8 @@ void setCategoryColor(const QString &category, const QColor &color) s_categoryColor.remove(category); } +static bool wasLogViewerShown = false; + void LoggingViewer::showLoggingView() { LoggingViewManagerWidget *staticLogWidget = LoggingViewManagerWidget::instance(); @@ -1108,10 +1110,15 @@ void LoggingViewer::showLoggingView() staticLogWidget->show(); staticLogWidget->raise(); staticLogWidget->activateWindow(); + + wasLogViewerShown = true; } void LoggingViewer::hideLoggingView() { + if (!wasLogViewerShown) + return; + LoggingViewManagerWidget *staticLogWidget = LoggingViewManagerWidget::instance(); QTC_ASSERT(staticLogWidget, return); staticLogWidget->close();