diff --git a/src/core/MainWindow.cpp b/src/core/MainWindow.cpp index 64752b3f..0fba7635 100644 --- a/src/core/MainWindow.cpp +++ b/src/core/MainWindow.cpp @@ -344,7 +344,7 @@ void MainWindow::setOverviewData() bool MainWindow::isOverviewActive() { - if (!overviewDock || overviewDock->userClosed) { + if (!overviewDock || overviewDock->userClosed || !overviewDock->isVisible) { return false; } if (core->isGraphEmpty()) { diff --git a/src/widgets/OverviewWidget.cpp b/src/widgets/OverviewWidget.cpp index 3608b64a..3068f05a 100644 --- a/src/widgets/OverviewWidget.cpp +++ b/src/widgets/OverviewWidget.cpp @@ -15,6 +15,7 @@ OverviewWidget::OverviewWidget(MainWindow *main, QAction *action) : }); connect(this, &QDockWidget::visibilityChanged, this, [ = ](bool visibility) { + isVisible = visibility; if (visibility) { updateContents(); } diff --git a/src/widgets/OverviewWidget.h b/src/widgets/OverviewWidget.h index 4265fb98..9fe0b7a7 100644 --- a/src/widgets/OverviewWidget.h +++ b/src/widgets/OverviewWidget.h @@ -19,6 +19,7 @@ public: * @brief if user closed this widget explicitly */ bool userClosed = false; + bool isVisible = false; private: RefreshDeferrer *refreshDeferrer; /**