From d61d3a70bfdf70860398fd7af99cfbf82885cc6d Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Wed, 31 Jul 2024 21:09:50 -0700 Subject: [PATCH] Fix synth help stalling when crafting the same recipe --- Craftimizer/Windows/SynthHelper.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Craftimizer/Windows/SynthHelper.cs b/Craftimizer/Windows/SynthHelper.cs index 8de6a2c..6d74765 100644 --- a/Craftimizer/Windows/SynthHelper.cs +++ b/Craftimizer/Windows/SynthHelper.cs @@ -124,13 +124,13 @@ public sealed unsafe class SynthHelper : Window, IDisposable if (WasCalculatable) SolverTask?.Cancel(); else if (Macro.Count == 0) - OnStateUpdated(); + CurrentState = GetCurrentState(); } - if (Macro.Count == 0) + if (Macro.Count == 0 && ShouldOpen) { if (ShouldOpen != WasOpen || IsCollapsed != WasCollapsed) - OnStateUpdated(); + CurrentState = GetCurrentState(); } if (!ShouldOpen) @@ -188,7 +188,10 @@ public sealed unsafe class SynthHelper : Window, IDisposable var recipeId = (ushort)agent->ActiveCraftRecipeId; if (agent->ActiveCraftRecipeId == 0) + { + RecipeData = null; return false; + } if (RecipeData?.RecipeId != agent->ActiveCraftRecipeId) OnStartCrafting(recipeId);