diff --git a/src/editor.cpp b/src/editor.cpp index d3116af4..54194a96 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -81,6 +81,7 @@ void Editor::saveUiFields() { void Editor::closeProject() { if (!this->project) return; + this->project->saveConfig(); Scripting::cb_ProjectClosed(this->project->root); Scripting::stop(); clearMap(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3f90e133..721a3fa3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -571,8 +571,7 @@ bool MainWindow::openProject(QString dir, bool initial) { } // Only create the config files once the project has opened successfully in case the user selected an invalid directory - userConfig.save(); - projectConfig.save(); + this->editor->project->saveConfig(); showWindowTitle(); this->statusBar()->showMessage(QString("Opened %1").arg(projectString));