Skip to content

Commit

Permalink
Don't overwrite stored layout of main window with incorrect one
Browse files Browse the repository at this point in the history
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 qbittorrent#20725.
Closes qbittorrent#20720.
  • Loading branch information
glassez authored Apr 20, 2024
1 parent 7310eec commit fc3953d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc3953d

Please sign in to comment.