✨ Navigation History
This commit is contained in:
@@ -29,10 +29,14 @@ public partial class ForwardBackwardButtonContainer : HBoxContainer
|
||||
private void OnBackwardButtonPressed()
|
||||
{
|
||||
_navigationHistoryService.GoBack();
|
||||
var current = _navigationHistoryService.Current;
|
||||
GodotGlobalEvents.Instance.FileExternallySelected.InvokeParallelFireAndForget(current!.File, current.LinePosition);
|
||||
}
|
||||
|
||||
private void OnForwardButtonPressed()
|
||||
{
|
||||
_navigationHistoryService.GoForward();
|
||||
var current = _navigationHistoryService.Current;
|
||||
GodotGlobalEvents.Instance.FileExternallySelected.InvokeParallelFireAndForget(current!.File, current.LinePosition);
|
||||
}
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public partial class IdeRoot : Control
|
||||
{
|
||||
await GodotGlobalEvents.Instance.FileExternallySelected.InvokeParallelAsync(file, linePosition);
|
||||
}
|
||||
_navigationHistoryService.ClearHistory();
|
||||
_navigationHistoryService.StartRecording();
|
||||
// Select the selected tab
|
||||
var selectedFile = filesToOpen.SingleOrDefault(f => f.IsSelected);
|
||||
if (selectedFile.Item1 is not null) await GodotGlobalEvents.Instance.FileExternallySelected.InvokeParallelAsync(selectedFile.Item1, selectedFile.Item2);
|
||||
|
||||
Reference in New Issue
Block a user