Example #1
0
		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;
		}
Example #2
0
		internal void setContext(CommandContext cmdContext)
		{
			this.cmdContext = cmdContext;
			foreach (Command cmd in subCommands)
				cmd.setContext(cmdContext);
		}