Restart RecipeNote solving if it was stopped halfway through
This commit is contained in:
@@ -102,6 +102,11 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
{
|
{
|
||||||
if (wasOpen)
|
if (wasOpen)
|
||||||
BestMacroTokenSource?.Cancel();
|
BestMacroTokenSource?.Cancel();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!BestSuggestedMacro.HasValue && CraftStatus == CraftableStatus.OK && BestMacroTokenSource == null)
|
||||||
|
CalculateBestMacros();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wasOpen = isOpen;
|
wasOpen = isOpen;
|
||||||
@@ -172,7 +177,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
statsChanged = true;
|
statsChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((statsChanged || (BestMacroTokenSource?.IsCancellationRequested ?? false)) && CraftStatus == CraftableStatus.OK)
|
if (statsChanged && CraftStatus == CraftableStatus.OK)
|
||||||
CalculateBestMacros();
|
CalculateBestMacros();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user