private object ExecuteCommand(MtlEditorCommand cmd) { object ret = cmd.Execute(); int count = command_history_.Count - end_command_index_; if (count > 0) { command_history_.RemoveRange(end_command_index_, count); } ++end_command_index_; command_history_.Add(cmd); this.UpdateHistroy(); return(ret); }
private object ExecuteCommand(MtlEditorCommand cmd) { object ret = cmd.Execute(); int count = command_history_.Count - end_command_index_; if (count > 0) { command_history_.RemoveRange(end_command_index_, count); } ++ end_command_index_; command_history_.Add(cmd); this.UpdateHistroy(); return ret; }