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))
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);
totalParameterFlags |= flag;
}

View file

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

View file

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

View file

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