From 0bbfeeb98761b80d09011c3cfc75785943bff081 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 c7e15e40c..fb01833f1 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -781,8 +781,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