Fix synth help stalling when crafting the same recipe
This commit is contained in:
@@ -124,13 +124,13 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
|||||||
if (WasCalculatable)
|
if (WasCalculatable)
|
||||||
SolverTask?.Cancel();
|
SolverTask?.Cancel();
|
||||||
else if (Macro.Count == 0)
|
else if (Macro.Count == 0)
|
||||||
OnStateUpdated();
|
CurrentState = GetCurrentState();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Macro.Count == 0)
|
if (Macro.Count == 0 && ShouldOpen)
|
||||||
{
|
{
|
||||||
if (ShouldOpen != WasOpen || IsCollapsed != WasCollapsed)
|
if (ShouldOpen != WasOpen || IsCollapsed != WasCollapsed)
|
||||||
OnStateUpdated();
|
CurrentState = GetCurrentState();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ShouldOpen)
|
if (!ShouldOpen)
|
||||||
@@ -188,7 +188,10 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
|||||||
var recipeId = (ushort)agent->ActiveCraftRecipeId;
|
var recipeId = (ushort)agent->ActiveCraftRecipeId;
|
||||||
|
|
||||||
if (agent->ActiveCraftRecipeId == 0)
|
if (agent->ActiveCraftRecipeId == 0)
|
||||||
|
{
|
||||||
|
RecipeData = null;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (RecipeData?.RecipeId != agent->ActiveCraftRecipeId)
|
if (RecipeData?.RecipeId != agent->ActiveCraftRecipeId)
|
||||||
OnStartCrafting(recipeId);
|
OnStartCrafting(recipeId);
|
||||||
|
|||||||
Reference in New Issue
Block a user