From 29e59018fe32b758819d1b58db104389cb96f606 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Wed, 21 Jan 2026 00:24:48 +1000 Subject: [PATCH] fix godot warning --- src/SharpIDE.Godot/Features/Build/BuildPanel.cs | 2 +- src/SharpIDE.Godot/Features/TerminalBase/SharpIdeTerminal.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SharpIDE.Godot/Features/Build/BuildPanel.cs b/src/SharpIDE.Godot/Features/Build/BuildPanel.cs index 26d990f..11ea2e3 100644 --- a/src/SharpIDE.Godot/Features/Build/BuildPanel.cs +++ b/src/SharpIDE.Godot/Features/Build/BuildPanel.cs @@ -30,7 +30,7 @@ public partial class BuildPanel : Control private async Task OnBuildStarted(BuildStartedFlags _) { - _terminal.ClearTerminal(); + await this.InvokeAsync(() => _terminal.ClearTerminal()); _buildOutputChannelReader ??= _buildService.BuildTextWriter.ConsoleChannel.Reader; } } \ No newline at end of file diff --git a/src/SharpIDE.Godot/Features/TerminalBase/SharpIdeTerminal.cs b/src/SharpIDE.Godot/Features/TerminalBase/SharpIdeTerminal.cs index 17918ba..3fd3ab5 100644 --- a/src/SharpIDE.Godot/Features/TerminalBase/SharpIdeTerminal.cs +++ b/src/SharpIDE.Godot/Features/TerminalBase/SharpIdeTerminal.cs @@ -37,6 +37,7 @@ public partial class SharpIdeTerminal : Control _previousArrayEndedInCr = text.Length > 0 && text[^1] == (byte)'\r'; } + [RequiresGodotUiThread] public void ClearTerminal() { // .Clear removes all text except for the bottom row, so lets make sure we have a blank line, and cursor at start