From 55e8aa47345bf10173d140c0bc2872fb2fbc33d6 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Wed, 1 Oct 2025 19:53:40 +1000 Subject: [PATCH] add opened slns to previous sln list --- src/SharpIDE.Godot/Features/IdeSettings/AppState.cs | 4 ++-- src/SharpIDE.Godot/IdeWindow.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SharpIDE.Godot/Features/IdeSettings/AppState.cs b/src/SharpIDE.Godot/Features/IdeSettings/AppState.cs index 105e7f8..9580e4e 100644 --- a/src/SharpIDE.Godot/Features/IdeSettings/AppState.cs +++ b/src/SharpIDE.Godot/Features/IdeSettings/AppState.cs @@ -4,7 +4,7 @@ public class AppState { public string? LastOpenSolutionFilePath { get; set; } public IdeSettings IdeSettings { get; set; } = new IdeSettings(); - public List PreviouslyOpenedSolutions { get; set; } = []; + public HashSet PreviouslyOpenedSolutions { get; set; } = []; } public class IdeSettings @@ -12,7 +12,7 @@ public class IdeSettings public bool AutoOpenLastSolution { get; set; } } -public class PreviouslyOpenedSln +public record PreviouslyOpenedSln { public required string Name { get; set; } public required string FilePath { get; set; } diff --git a/src/SharpIDE.Godot/IdeWindow.cs b/src/SharpIDE.Godot/IdeWindow.cs index 50a923d..0a71bee 100644 --- a/src/SharpIDE.Godot/IdeWindow.cs +++ b/src/SharpIDE.Godot/IdeWindow.cs @@ -79,6 +79,7 @@ public partial class IdeWindow : Control return; } ideRoot.SetSlnFilePath(slnPath); + Singletons.AppState.PreviouslyOpenedSolutions.Add(new PreviouslyOpenedSln { FilePath = slnPath, Name = Path.GetFileName(slnPath) }); await this.InvokeAsync(() => {