From 6ee76f80d1ffb131239ab181112cd8b68286ca01 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 1 Oct 2023 02:48:32 -0400 Subject: [PATCH] Fix project settings editor regression --- forms/projectsettingseditor.ui | 3 +++ src/ui/projectsettingseditor.cpp | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/forms/projectsettingseditor.ui b/forms/projectsettingseditor.ui index 7980e0175..7fac991d4 100644 --- a/forms/projectsettingseditor.ui +++ b/forms/projectsettingseditor.ui @@ -282,6 +282,9 @@ The file that will be used to populate the Prefabs tab + + prefabs.json + diff --git a/src/ui/projectsettingseditor.cpp b/src/ui/projectsettingseditor.cpp index 45f795791..ceb16834b 100644 --- a/src/ui/projectsettingseditor.cpp +++ b/src/ui/projectsettingseditor.cpp @@ -389,13 +389,15 @@ void ProjectSettingsEditor::closeEvent(QCloseEvent* event) { return; } - if (this->projectNeedsReload) { - if (this->prompt("Settings changed, reload project to apply changes?") == QMessageBox::Yes) - emit this->reloadProject(); - } - porymapConfig.setProjectSettingsEditorGeometry( this->saveGeometry(), this->saveState() ); + + if (this->projectNeedsReload) { + if (this->prompt("Settings changed, reload project to apply changes?") == QMessageBox::Yes){ + // Reloading the project will destroy this window, no other work should happen after this signal is emitted + emit this->reloadProject(); + } + } }