From d31665a4d8fd41c19801868a29eb7fb466eaf57a Mon Sep 17 00:00:00 2001 From: cristian64 Date: Thu, 16 May 2024 20:22:30 +0100 Subject: [PATCH] Use splitter's section size to determine whether scanner pane is visible. This was a regression in e8ea2b3486973, where the visibility predicate was changed to something more readable. As it turned out, the visibility of the widget does not indicate whether it is visible: the splitter may be collapsed. The predicate has now been reverted to what it was previously. Test plan: - Launch DME. - Collapse the scanner pane. - Exit DME. - Launch DME. Without this change, the **View > Scanner** would be checked, even though the pane is collapsed. --- Source/GUI/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/GUI/MainWindow.cpp b/Source/GUI/MainWindow.cpp index 7d3e68ed..547e6970 100644 --- a/Source/GUI/MainWindow.cpp +++ b/Source/GUI/MainWindow.cpp @@ -86,7 +86,7 @@ void MainWindow::makeMenus() m_actScanner->setCheckable(true); QTimer::singleShot(0, [this]() { QSignalBlocker signalBlocker(m_actScanner); - m_actScanner->setChecked(m_scanner->isVisible()); + m_actScanner->setChecked(m_splitter->sizes()[0] > 0); }); m_actQuit = new QAction(tr("&Quit"), this);