From fc3953dbaa7e64c63c27e8edc40d1deb899dcf63 Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Sat, 20 Apr 2024 11:10:31 +0300 Subject: [PATCH] Don't overwrite stored layout of main window with incorrect one Prevents overwriting of the stored layout in case the main window was hidden at startup and has not been shown since, because incorrect dimensions can be provided by it in this case. PR #20725. Closes #20720. --- src/gui/mainwindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 2893220f7..14a43ec99 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -796,8 +796,11 @@ void MainWindow::saveSplitterSettings() const void MainWindow::cleanup() { - saveSettings(); - saveSplitterSettings(); + if (!m_neverShown) + { + saveSettings(); + saveSplitterSettings(); + } // delete RSSWidget explicitly to avoid crash in // handleRSSUnreadCountUpdated() at application shutdown