diff options
Diffstat (limited to 'indra/llui/llcommandmanager.cpp')
-rw-r--r-- | indra/llui/llcommandmanager.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index b1147134c2..a8127ab3e3 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -112,9 +112,25 @@ LLCommand * LLCommandManager::getCommand(const LLCommandId& commandId) return command_match; } +LLCommand * LLCommandManager::getCommand(const LLUUID& commandUUID) +{ + LLCommand * command_match = NULL; + + CommandUUIDMap::const_iterator found = mCommandUUIDs.find(commandUUID); + + if (found != mCommandUUIDs.end()) + { + command_match = mCommands[found->second]; + } + + return command_match; +} + void LLCommandManager::addCommand(LLCommand * command) { - mCommandIndices[command->id()] = mCommands.size(); + LLCommandId command_id = command->id(); + mCommandIndices[command_id] = mCommands.size(); + mCommandUUIDs[command_id.uuid()] = mCommands.size(); mCommands.push_back(command); lldebugs << "Successfully added command: " << command->id().name() << llendl; |