Fix bug with deleting a project

This commit is contained in:
Cj 2024-06-19 06:33:59 -04:00
parent 3cce4dd070
commit 13212c7c78

View File

@ -43,6 +43,13 @@ public partial class ReCodeItForm : Form
if (AppSettings.CrossCompiler.AutoLoadLastActiveProject if (AppSettings.CrossCompiler.AutoLoadLastActiveProject
&& ActiveProjectMappingsCheckbox.Checked) && ActiveProjectMappingsCheckbox.Checked)
{ {
if (CrossCompiler.ActiveProject == null)
{
DataProvider.LoadMappingFile(AppSettings.Remapper.MappingPath);
LoadedMappingFilePath.Text = AppSettings.Remapper.MappingPath;
return;
}
LoadedMappingFilePath.Text = $"Project Mode: ({CrossCompiler.ActiveProject.SolutionName})"; LoadedMappingFilePath.Text = $"Project Mode: ({CrossCompiler.ActiveProject.SolutionName})";
ReloadTreeView(CrossCompiler.ActiveProject.RemapModels); ReloadTreeView(CrossCompiler.ActiveProject.RemapModels);
@ -749,6 +756,8 @@ public partial class ReCodeItForm : Form
if (!File.Exists(ccSettings.LastLoadedProject)) if (!File.Exists(ccSettings.LastLoadedProject))
{ {
ccSettings.LastLoadedProject = string.Empty;
DataProvider.SaveAppSettings();
MessageBox.Show("Couldnt find last loaded project"); MessageBox.Show("Couldnt find last loaded project");
return; return;
} }