public void Undo() { if (!CanUndo) { return; } DrawTools.Command.Command command = historyList[nextUndo]; command.Undo(); nextUndo--; }
/// <summary> /// Undo /// </summary> public void Undo() { if (!CanUndo) { return; } // Get the Command object to be undone DrawTools.Command.Command command = historyList[nextUndo]; // Execute the Command object's undo method command.Undo(); // Move the pointer up one item nextUndo--; }