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.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index d8c2987470..bc451ecfc0 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -175,20 +175,28 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& value, EAddPosition pos
char first[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
char last[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
- LLString fullname;
- if (gCacheName->getName(item->getUUID(), first, last))
- {
- fullname.assign(first);
- fullname.append(1, ' ');
- fullname.append(last);
- }
- else // didn't work as a resident name, try looking up as a group
+ // use supplied name by default
+ LLString fullname = value["name"].asString();
+ if (value["target"].asString() == "GROUP")
{
char group_name[DB_GROUP_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
gCacheName->getGroupName(item->getUUID(), group_name);
// fullname will be "nobody" if group not found
fullname = group_name;
}
+ else if (value["target"].asString() == "SPECIAL")
+ {
+ // just use supplied name
+ }
+ else // normal resident
+ {
+ if (gCacheName->getName(item->getUUID(), first, last))
+ {
+ fullname.assign(first);
+ fullname.append(1, ' ');
+ fullname.append(last);
+ }
+ }
LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
((LLScrollListText*)cell)->setText( fullname );
@@ -429,3 +437,4 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
return name_list;
}
+