diff --git a/Glamourer/Api/GlamourerIpc.Apply.cs b/Glamourer/Api/GlamourerIpc.Apply.cs index f09d491..fcff35b 100644 --- a/Glamourer/Api/GlamourerIpc.Apply.cs +++ b/Glamourer/Api/GlamourerIpc.Apply.cs @@ -163,7 +163,7 @@ public partial class GlamourerIpc if ((hasModelId || state.ModelData.ModelId == 0) && state.CanUnlock(lockCode)) { _stateManager.ApplyDesign(state, design, - new ApplySettings(Source: once ? StateSource.IpcManual : StateSource.IpcFixed, Key: lockCode)); + new ApplySettings(Source: once ? StateSource.IpcManual : StateSource.IpcFixed, Key: lockCode, MergeLinks: true)); state.Lock(lockCode); } } diff --git a/Glamourer/Designs/IDesignEditor.cs b/Glamourer/Designs/IDesignEditor.cs index b655327..d882310 100644 --- a/Glamourer/Designs/IDesignEditor.cs +++ b/Glamourer/Designs/IDesignEditor.cs @@ -24,6 +24,16 @@ public readonly record struct ApplySettings( MergeLinks = false, }; + public static readonly ApplySettings ManualWithLinks = new() + { + Key = 0, + Source = StateSource.Manual, + FromJobChange = false, + RespectManual = false, + UseSingleSource = false, + MergeLinks = true, + }; + public static readonly ApplySettings Game = new() { Key = 0, diff --git a/Glamourer/Gui/DesignQuickBar.cs b/Glamourer/Gui/DesignQuickBar.cs index 1ad28b0..a1a748f 100644 --- a/Glamourer/Gui/DesignQuickBar.cs +++ b/Glamourer/Gui/DesignQuickBar.cs @@ -163,7 +163,7 @@ public sealed class DesignQuickBar : Window, IDisposable var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags(); using var _ = design!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters); - _stateManager.ApplyDesign(state, design, ApplySettings.Manual); + _stateManager.ApplyDesign(state, design, ApplySettings.ManualWithLinks); } public void DrawRevertButton(Vector2 buttonSize) diff --git a/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs b/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs index fc69095..968b88c 100644 --- a/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs +++ b/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs @@ -344,7 +344,7 @@ public class ActorPanel( var text = ImGui.GetClipboardText(); var design = _converter.FromBase64(text, applyCustomize, applyGear, out _) ?? throw new Exception("The clipboard did not contain valid data."); - _stateManager.ApplyDesign(_state!, design, ApplySettings.Manual with { MergeLinks = true }); + _stateManager.ApplyDesign(_state!, design, ApplySettings.ManualWithLinks); } catch (Exception ex) { diff --git a/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs b/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs index 4fa302e..3cf46fe 100644 --- a/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs +++ b/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs @@ -458,7 +458,7 @@ public class DesignPanel( { var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags(); using var _ = _selector.Selected!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters); - _state.ApplyDesign(state, _selector.Selected!, ApplySettings.Manual with { MergeLinks = true }); + _state.ApplyDesign(state, _selector.Selected!, ApplySettings.ManualWithLinks); } } @@ -477,7 +477,7 @@ public class DesignPanel( { var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags(); using var _ = _selector.Selected!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters); - _state.ApplyDesign(state, _selector.Selected!, ApplySettings.Manual with {MergeLinks = true}); + _state.ApplyDesign(state, _selector.Selected!, ApplySettings.ManualWithLinks); } } diff --git a/Glamourer/Services/CommandService.cs b/Glamourer/Services/CommandService.cs index 2f3e938..20cd1e6 100644 --- a/Glamourer/Services/CommandService.cs +++ b/Glamourer/Services/CommandService.cs @@ -417,7 +417,7 @@ public class CommandService : IDisposable if (!_objects.TryGetValue(identifier, out var actors)) { if (_stateManager.TryGetValue(identifier, out var state)) - _stateManager.ApplyDesign(state, design, ApplySettings.Manual with { MergeLinks = true }); + _stateManager.ApplyDesign(state, design, ApplySettings.ManualWithLinks); } else { @@ -426,7 +426,7 @@ public class CommandService : IDisposable if (_stateManager.GetOrCreate(actor.GetIdentifier(_actors), actor, out var state)) { ApplyModSettings(design, actor, applyMods); - _stateManager.ApplyDesign(state, design, ApplySettings.Manual with { MergeLinks = true }); + _stateManager.ApplyDesign(state, design, ApplySettings.ManualWithLinks); } } }