From 8b8f85dd85b0c2b98ddf079afd290a7ab35164ff Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Wed, 17 Jan 2024 14:29:30 +0100 Subject: [PATCH] Fixed handling of Pending in automation. --- Glamourer/Automation/AutoDesignApplier.cs | 2 +- Glamourer/Events/StateChanged.cs | 2 +- Glamourer/State/StateListener.cs | 2 +- Glamourer/State/StateManager.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Glamourer/Automation/AutoDesignApplier.cs b/Glamourer/Automation/AutoDesignApplier.cs index 52df3e9..07bf41f 100644 --- a/Glamourer/Automation/AutoDesignApplier.cs +++ b/Glamourer/Automation/AutoDesignApplier.cs @@ -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; } diff --git a/Glamourer/Events/StateChanged.cs b/Glamourer/Events/StateChanged.cs index 8555838..01e2758 100644 --- a/Glamourer/Events/StateChanged.cs +++ b/Glamourer/Events/StateChanged.cs @@ -59,7 +59,7 @@ public sealed class StateChanged() Fixed, Ipc, // Only used for CustomizeParameters. - Outstanding, + Pending, } public enum Priority diff --git a/Glamourer/State/StateListener.cs b/Glamourer/State/StateListener.cs index 6b33d71..dda3cd1 100644 --- a/Glamourer/State/StateListener.cs +++ b/Glamourer/State/StateListener.cs @@ -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) { diff --git a/Glamourer/State/StateManager.cs b/Glamourer/State/StateManager.cs index 807f5c8..bb99396 100644 --- a/Glamourer/State/StateManager.cs +++ b/Glamourer/State/StateManager.cs @@ -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))