From 43eabdf54afa89ba04aeed7b8e1aac8d68a7fbfe Mon Sep 17 00:00:00 2001 From: teinarss Date: Mon, 23 Dec 2019 10:58:08 +0100 Subject: [PATCH] Fix naming in editor --- OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs index 5cb707c016..8568babda8 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs @@ -426,6 +426,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic } public bool IsDirty { get; private set; } + public bool ShouldDoOnSave { get { return false; } } } public interface IEditActorHandle @@ -433,6 +434,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic void Do(EditorActorPreview actor); void Undo(EditorActorPreview actor); bool IsDirty { get; } + bool ShouldDoOnSave { get; } } class EditActorEditorAction : IEditorAction @@ -455,6 +457,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic public void Execute() { + foreach (var editorActionHandle in handles.Where(h => h.ShouldDoOnSave)) + editorActionHandle.Do(actor); } public void Do() @@ -538,5 +542,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic } public bool IsDirty { get; private set; } + public bool ShouldDoOnSave { get { return true; } } } }