void UndoLineCommand() { Debug.Log("UndoLineCommmand"); // If we have recorded the history AND have a record going back that far. if (setupInstance.totalHistoriesRecorded > setupInstance.historyBacktraceOffset && setupInstance.history.size > setupInstance.historyBacktraceOffset) { // execute inverted co*mmand up to count times LineCommand lc = setupInstance.history.Recall(setupInstance.historyBacktraceOffset); lc.Invert(); ApplyCommand(ref lc); // pull back historyOffset+1 ++setupInstance.historyBacktraceOffset; } }