From 2c65ed0818bb2700286d6e74d9e97214d6e90b9c Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Wed, 21 Jan 2026 01:38:46 +1000 Subject: [PATCH] sln explorer set selected fast path --- .../Features/SolutionExplorer/SolutionExplorerPanel.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.cs b/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.cs index 5599ada..b786106 100644 --- a/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.cs +++ b/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.cs @@ -98,6 +98,14 @@ public partial class SolutionExplorerPanel : MarginContainer { await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding); var task = GodotGlobalEvents.Instance.FileSelected.InvokeParallelAsync(file, fileLinePosition); + // First check if the file is already selected + var selectedItem = _tree.GetSelected(); + if (selectedItem is not null) + { + var selectedFile = selectedItem.GetTypedMetadata?>(0)?.Item; + if (selectedFile == file) + return; + } var item = FindItemRecursive(_tree.GetRoot(), file); if (item is not null) {