Skip to content

Commit

Permalink
Fix project settings editor regression
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Oct 1, 2023
1 parent 56d53d2 commit 6ee76f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions forms/projectsettingseditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@
<property name="toolTip">
<string>The file that will be used to populate the Prefabs tab</string>
</property>
<property name="placeholderText">
<string>prefabs.json</string>
</property>
</widget>
</item>
<item row="0" column="0">
Expand Down
12 changes: 7 additions & 5 deletions src/ui/projectsettingseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}

0 comments on commit 6ee76f8

Please sign in to comment.