From 59f365b16ded844157bb37d339c6ec160512ddbe Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 19 Dec 2023 12:46:47 -0500 Subject: [PATCH] Fix project reload not disabling window on failure --- CHANGELOG.md | 1 + src/mainwindow.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58b04fb4..e7254c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d - Fix some issues when too few/many pokémon are specified for a wild encounter group. - Fix Porymap reporting errors for macros it doesn't use. - Fix painting on the Collision tab with the opacity slider at 0 painting metatiles. +- Fix crashes when File->Reload Project fails. ## [5.1.1] - 2023-02-20 ### Added diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8ac833ed..cbb3c5a0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -643,7 +643,8 @@ void MainWindow::on_action_Reload_Project_triggered() { warning.setIcon(QMessageBox::Warning); if (warning.exec() == QMessageBox::Ok) { - openProject(editor->project->root); + if (!openProject(editor->project->root)) + setWindowDisabled(true); } }