internal UndoManager(FlowChart document) { this.document = document; defaultCmdContext = new CommandContext(document); history = new CommandHistory(); resetContext(); // disable undo by default, it might be too expensive // in memory and CPU cycles undoEnabled = false; }
internal void setContext(CommandContext cmdContext) { this.cmdContext = cmdContext; foreach (Command cmd in subCommands) cmd.setContext(cmdContext); }