示例#1
0
 // Call this before making any change to track.
 public static void PrepareForChange()
 {
     Dirty = true;
     undoStack.Push(track.Clone() as Track);
     redoStack.Clear();
     UndoRedoStackUpdated?.Invoke();
 }
示例#2
0
 public static void Redo()
 {
     if (redoStack.Empty())
     {
         return;
     }
     undoStack.Push(track.Clone() as Track);
     track = redoStack.Pop();
     Dirty = true;
     DirtynessUpdated?.Invoke(Dirty);
     UndoneOrRedone?.Invoke();
     UndoRedoStackUpdated?.Invoke();
 }