From 13212c7c78657d4c08b62a841e26432e2b1790a2 Mon Sep 17 00:00:00 2001 From: Cj <161484149+CJ-SPT@users.noreply.github.com> Date: Wed, 19 Jun 2024 06:33:59 -0400 Subject: [PATCH] Fix bug with deleting a project --- RecodeItGUI/GUI/Main.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/RecodeItGUI/GUI/Main.cs b/RecodeItGUI/GUI/Main.cs index 4ea9454..9d5e226 100644 --- a/RecodeItGUI/GUI/Main.cs +++ b/RecodeItGUI/GUI/Main.cs @@ -43,6 +43,13 @@ public partial class ReCodeItForm : Form if (AppSettings.CrossCompiler.AutoLoadLastActiveProject && ActiveProjectMappingsCheckbox.Checked) { + if (CrossCompiler.ActiveProject == null) + { + DataProvider.LoadMappingFile(AppSettings.Remapper.MappingPath); + LoadedMappingFilePath.Text = AppSettings.Remapper.MappingPath; + return; + } + LoadedMappingFilePath.Text = $"Project Mode: ({CrossCompiler.ActiveProject.SolutionName})"; ReloadTreeView(CrossCompiler.ActiveProject.RemapModels); @@ -749,6 +756,8 @@ public partial class ReCodeItForm : Form if (!File.Exists(ccSettings.LastLoadedProject)) { + ccSettings.LastLoadedProject = string.Empty; + DataProvider.SaveAppSettings(); MessageBox.Show("Couldnt find last loaded project"); return; }