Fix toolbar disappearing in a certain circumstance.

This commit is contained in:
Lenny McLennington 2022-05-17 00:21:57 +01:00
parent f66598db8a
commit 6dfec4db40
No known key found for this signature in database
GPG Key ID: F0467078ECA45FCB

View File

@ -1865,6 +1865,9 @@ void MainWindow::globalSettingsClosed()
updateMainToolBar();
updateToolsMenu();
updateStatusCenter();
// This needs to be done to prevent UI elements disappearing in the event the config is changed
// but PolyMC exits abnormally, causing the window state to never be saved:
APPLICATION->settings()->set("MainWindowState", saveState().toBase64());
update();
}