public void ExecuteCommand(Command cmd) { if (disabledCommands > 0) return; if (cmd is UndoableCommand) { (cmd as UndoableCommand).autoUndo = autoUndoCommands > 0; history.Push(cmd as UndoableCommand); } cmd.Execute(); // redoStack.Clear(); }
public void ExecuteCommand(Command cmd) { if (disabledCommands > 0) return; if (cmd is UndoableCommand) { (cmd as UndoableCommand).autoUndo = autoUndoCommands > 0; history.Push(cmd as UndoableCommand); } cmd.Execute(); // redoStack.Clear(); // TextSource.CurrentTB.OnUndoRedoStateChanged(); }