Fixed handling of Pending in automation.

This commit is contained in:
Ottermandias 2024-01-17 14:29:30 +01:00
parent 3b5f89e6a1
commit 8b8f85dd85
4 changed files with 4 additions and 4 deletions

View file

@ -360,7 +360,7 @@ public class AutoDesignApplier : IDisposable
if (!parameterFlags.HasFlag(flag)) if (!parameterFlags.HasFlag(flag))
continue; continue;
if (!respectManual || state[flag] is not StateChanged.Source.Manual) if (!respectManual || state[flag] is not StateChanged.Source.Manual and not StateChanged.Source.Pending)
_state.ChangeCustomizeParameter(state, flag, design.Parameters[flag], source); _state.ChangeCustomizeParameter(state, flag, design.Parameters[flag], source);
totalParameterFlags |= flag; totalParameterFlags |= flag;
} }

View file

@ -59,7 +59,7 @@ public sealed class StateChanged()
Fixed, Fixed,
Ipc, Ipc,
// Only used for CustomizeParameters. // Only used for CustomizeParameters.
Outstanding, Pending,
} }
public enum Priority public enum Priority

View file

@ -753,7 +753,7 @@ public class StateListener : IDisposable
state.BaseData.Parameters.Set(flag, newValue); state.BaseData.Parameters.Set(flag, newValue);
model.ApplySingleParameterData(flag, state.ModelData.Parameters); model.ApplySingleParameterData(flag, state.ModelData.Parameters);
break; break;
case StateChanged.Source.Outstanding: case StateChanged.Source.Pending:
state.BaseData.Parameters.Set(flag, newValue); state.BaseData.Parameters.Set(flag, newValue);
if (_config.UseAdvancedParameters) if (_config.UseAdvancedParameters)
{ {

View file

@ -404,7 +404,7 @@ public class StateManager(
_editor.ChangeCrest(state, slot, design.DesignData.Crest(slot), source, out _, key); _editor.ChangeCrest(state, slot, design.DesignData.Crest(slot), source, out _, key);
var paramSource = source is StateChanged.Source.Manual && redraw var paramSource = source is StateChanged.Source.Manual && redraw
? StateChanged.Source.Outstanding ? StateChanged.Source.Pending
: source; : source;
foreach (var flag in CustomizeParameterExtensions.AllFlags.Where(design.DoApplyParameter)) foreach (var flag in CustomizeParameterExtensions.AllFlags.Where(design.DoApplyParameter))