summaryrefslogtreecommitdiff
path: root/indra/newview/llnamelistctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rw-r--r--indra/newview/llnamelistctrl.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index e1bf9b1a17..92805e03f0 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -464,6 +464,34 @@ LLScrollListItem* LLNameListCtrl::getNameItemByAgentId(const LLUUID& agent_id)
return NULL;
}
+void LLNameListCtrl::selectItemBySpecialId(const LLUUID& special_id)
+{
+ if (special_id.isNull())
+ {
+ return;
+ }
+
+ for (item_list::iterator it = getItemList().begin(); it != getItemList().end(); it++)
+ {
+ LLNameListItem* item = dynamic_cast<LLNameListItem*>(*it);
+ if (item && item->getSpecialID() == special_id)
+ {
+ item->setSelected(TRUE);
+ break;
+ }
+ }
+}
+
+LLUUID LLNameListCtrl::getSelectedSpecialId()
+{
+ LLNameListItem* item = dynamic_cast<LLNameListItem*>(getFirstSelected());
+ if(item)
+ {
+ return item->getSpecialID();
+ }
+ return LLUUID();
+}
+
void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name,
std::string suffix,