summaryrefslogtreecommitdiff
path: root/indra/newview/llnamelistctrl.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-08-02 22:49:32 +0000
committerDon Kjer <don@lindenlab.com>2012-08-02 22:49:32 +0000
commit5e8b525670456a6897127dd8029b5a740dc31c20 (patch)
tree8d0e6b86ce26c3da4d354384fbedf336e324e4b6 /indra/newview/llnamelistctrl.cpp
parentbd1b664d45a75e57209e06b288849c0536d00151 (diff)
parent7fa426f4db002a6bd34faba42936d71359337d6c (diff)
Merge viewer-development -> viewer-horde-fixes
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rw-r--r--indra/newview/llnamelistctrl.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 4e28d1f526..5029d26fda 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -336,7 +336,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
// ...schedule a callback
LLAvatarNameCache::get(id,
boost::bind(&LLNameListCtrl::onAvatarNameCache,
- this, _1, _2));
+ this, _1, _2, item->getHandle()));
}
break;
}
@@ -392,7 +392,8 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id)
}
void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
- const LLAvatarName& av_name)
+ const LLAvatarName& av_name,
+ LLHandle<LLNameListItem> item)
{
std::string name;
if (mShortNames)
@@ -400,17 +401,14 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
else
name = av_name.getCompleteName();
- item_list::iterator iter;
- for (iter = getItemList().begin(); iter != getItemList().end(); iter++)
+ LLNameListItem* list_item = item.get();
+ if (list_item && list_item->getUUID() == agent_id)
{
- LLScrollListItem* item = *iter;
- if (item->getUUID() == agent_id)
+ LLScrollListCell* cell = list_item->getColumn(mNameColumnIndex);
+ if (cell)
{
- LLScrollListCell* cell = item->getColumn(mNameColumnIndex);
- if (cell)
- {
- cell->setValue(name);
- }
+ cell->setValue(name);
+ setNeedsSort();
}
}