From c3069b0e4166aa983a99e2b4de4941af0f333b28 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Wed, 29 Oct 2025 20:40:13 +1000 Subject: [PATCH] nav history v2 --- .../IdeNavigationHistoryService.cs | 7 +++++++ .../ForwardBackwardButtonContainer.cs | 20 +++++++++++++++++++ .../ForwardBackwardButtonContainer.tscn | 4 ++-- .../SolutionExplorer/SolutionExplorerPanel.cs | 1 - src/SharpIDE.Godot/IdeRoot.cs | 4 ++++ 5 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/SharpIDE.Application/Features/NavigationHistory/IdeNavigationHistoryService.cs b/src/SharpIDE.Application/Features/NavigationHistory/IdeNavigationHistoryService.cs index 5f08817..4ef0f05 100644 --- a/src/SharpIDE.Application/Features/NavigationHistory/IdeNavigationHistoryService.cs +++ b/src/SharpIDE.Application/Features/NavigationHistory/IdeNavigationHistoryService.cs @@ -29,6 +29,13 @@ public class IdeNavigationHistoryService _forwardStack.Clear(); } + public void ClearHistory() + { + _backStack.Clear(); + _forwardStack.Clear(); + _current = null; + } + public void GoBack() { if (!CanGoBack) throw new InvalidOperationException("Cannot go back, no history available."); diff --git a/src/SharpIDE.Godot/Features/Navigation/ForwardBackwardButtonContainer.cs b/src/SharpIDE.Godot/Features/Navigation/ForwardBackwardButtonContainer.cs index c8eff57..82a2afb 100644 --- a/src/SharpIDE.Godot/Features/Navigation/ForwardBackwardButtonContainer.cs +++ b/src/SharpIDE.Godot/Features/Navigation/ForwardBackwardButtonContainer.cs @@ -1,4 +1,5 @@ using Godot; +using R3; using SharpIDE.Application.Features.NavigationHistory; namespace SharpIDE.Godot.Features.Navigation; @@ -14,5 +15,24 @@ public partial class ForwardBackwardButtonContainer : HBoxContainer { _backwardButton = GetNode