Shiny new name cache.
This commit is contained in:
@@ -235,33 +235,24 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id)
|
||||
}
|
||||
|
||||
// public
|
||||
void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first,
|
||||
const std::string& last, BOOL is_group)
|
||||
void LLNameListCtrl::refresh(const LLUUID& agent_id, const std::string& full_name)
|
||||
{
|
||||
//llinfos << "LLNameListCtrl::refresh " << id << " '" << first << " "
|
||||
// << last << "'" << llendl;
|
||||
|
||||
std::string fullname;
|
||||
if (!is_group)
|
||||
{
|
||||
fullname = first + " " + last;
|
||||
}
|
||||
else
|
||||
{
|
||||
fullname = first;
|
||||
}
|
||||
|
||||
// TODO: scan items for that ID, fix if necessary
|
||||
item_list::iterator iter;
|
||||
for (iter = getItemList().begin(); iter != getItemList().end(); iter++)
|
||||
{
|
||||
LLScrollListItem* item = *iter;
|
||||
if (item->getUUID() == id)
|
||||
if (item->getUUID() == agent_id)
|
||||
{
|
||||
LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(0);
|
||||
cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
|
||||
|
||||
((LLScrollListText*)cell)->setText( fullname );
|
||||
LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
|
||||
if (cell)
|
||||
{
|
||||
((LLScrollListText*)cell)->setText( full_name );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,8 +261,7 @@ void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first,
|
||||
|
||||
|
||||
// static
|
||||
void LLNameListCtrl::refreshAll(const LLUUID& id, const std::string& first,
|
||||
const std::string& last, BOOL is_group)
|
||||
void LLNameListCtrl::refreshAll(const LLUUID& id, const std::string& full_name)
|
||||
{
|
||||
std::set<LLNameListCtrl*>::iterator it;
|
||||
for (it = LLNameListCtrl::sInstances.begin();
|
||||
@@ -279,7 +269,7 @@ void LLNameListCtrl::refreshAll(const LLUUID& id, const std::string& first,
|
||||
++it)
|
||||
{
|
||||
LLNameListCtrl* ctrl = *it;
|
||||
ctrl->refresh(id, first, last, is_group);
|
||||
ctrl->refresh(id, full_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user