/// <summary> /// Applies a new action to the level. /// </summary> /// <param name="action">The action to apply.</param> public void Apply(EditorAction action) { Unsaved = true; action.Apply(); PastActions.Push(action); FutureActions.Clear(); }
/// <summary> /// Applies the previously undone action, if one is available. /// </summary> public void Redo() { if (CanRedo()) { EditorAction action = FutureActions.Pop(); action.Apply(); Unsaved = true; PastActions.Push(action); } }