summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgrouproles.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-01-31 16:21:50 -0500
committerOz Linden <oz@lindenlab.com>2014-01-31 16:21:50 -0500
commit831251785762897a72da2b4dc9fb62731491fe4d (patch)
treed4c2d85477608e736a2fd0c2001070fbc0bf8950 /indra/newview/llpanelgrouproles.cpp
parente6de3616c715d94339bd43f25559faaef8ff3c55 (diff)
parent86676ec34be7be27f05460deb750d6eb334be0de (diff)
merge changes for storm-2011
Diffstat (limited to 'indra/newview/llpanelgrouproles.cpp')
-rwxr-xr-xindra/newview/llpanelgrouproles.cpp35
1 files changed, 25 insertions, 10 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index fdcd1f5ebb..94998f3c52 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -743,17 +743,20 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
mChanged(FALSE),
mPendingMemberUpdate(FALSE),
mHasMatch(FALSE),
- mNumOwnerAdditions(0),
- mAvatarNameCacheConnection()
+ mNumOwnerAdditions(0)
{
}
LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()
{
- if (mAvatarNameCacheConnection.connected())
+ for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it)
{
- mAvatarNameCacheConnection.disconnect();
+ if (it->second.connected())
+ {
+ it->second.disconnect();
+ }
}
+ mAvatarNameCacheConnections.clear();
if (mMembersList)
{
gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName());
@@ -1641,9 +1644,17 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
mHasMatch = TRUE;
}
-void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
+void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id)
{
- mAvatarNameCacheConnection.disconnect();
+ avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id);
+ if (it != mAvatarNameCacheConnections.end())
+ {
+ if (it->second.connected())
+ {
+ it->second.disconnect();
+ }
+ mAvatarNameCacheConnections.erase(it);
+ }
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap
@@ -1716,12 +1727,16 @@ void LLPanelGroupMembersSubTab::updateMembers()
else
{
// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
- // *TODO : Add one callback per fetched avatar name
- if (mAvatarNameCacheConnection.connected())
+ avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first);
+ if (it != mAvatarNameCacheConnections.end())
{
- mAvatarNameCacheConnection.disconnect();
+ if (it->second.connected())
+ {
+ it->second.disconnect();
+ }
+ mAvatarNameCacheConnections.erase(it);
}
- mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2));
+ mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2, _1));
}
}