Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix naming in editor #17496

Merged
merged 1 commit into from Jan 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs
Expand Up @@ -426,13 +426,15 @@ public void Undo(EditorActorPreview actor)
}

public bool IsDirty { get; private set; }
public bool ShouldDoOnSave { get { return false; } }
}

public interface IEditActorHandle
{
void Do(EditorActorPreview actor);
void Undo(EditorActorPreview actor);
bool IsDirty { get; }
bool ShouldDoOnSave { get; }
}

class EditActorEditorAction : IEditorAction
Expand All @@ -455,6 +457,8 @@ public EditActorEditorAction(EditorActorLayer editorActorLayer, EditorActorPrevi

public void Execute()
{
foreach (var editorActionHandle in handles.Where(h => h.ShouldDoOnSave))
editorActionHandle.Do(actor);
}

public void Do()
Expand Down Expand Up @@ -538,5 +542,6 @@ public void Undo(EditorActorPreview actor)
}

public bool IsDirty { get; private set; }
public bool ShouldDoOnSave { get { return true; } }
}
}