summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupgeneral.cpp
diff options
context:
space:
mode:
authorAnsariel <none@none>2014-01-28 19:45:50 +0100
committerAnsariel <none@none>2014-01-28 19:45:50 +0100
commit86676ec34be7be27f05460deb750d6eb334be0de (patch)
tree0fab05f350fe81c04cac9f0cd44008e97ef4b800 /indra/newview/llpanelgroupgeneral.cpp
parentd8a81b240e828a8ab27709fb11038a4b5c4d5428 (diff)
STORM-2011: Group member lists not loading properly
Diffstat (limited to 'indra/newview/llpanelgroupgeneral.cpp')
-rwxr-xr-xindra/newview/llpanelgroupgeneral.cpp35
1 files changed, 25 insertions, 10 deletions
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 0cd93b330a..6ba7d4f39d 100755
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -79,18 +79,21 @@ LLPanelGroupGeneral::LLPanelGroupGeneral()
mCtrlReceiveNotices(NULL),
mCtrlListGroup(NULL),
mActiveTitleLabel(NULL),
- mComboActiveTitle(NULL),
- mAvatarNameCacheConnection()
+ mComboActiveTitle(NULL)
{
}
LLPanelGroupGeneral::~LLPanelGroupGeneral()
{
- 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();
}
BOOL LLPanelGroupGeneral::postBuild()
@@ -732,12 +735,16 @@ void LLPanelGroupGeneral::updateMembers()
else
{
// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
- // *TODO : Use a callback per member, not for the panel group.
- 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(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2));
+ mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2, _1));
}
}
@@ -775,9 +782,17 @@ void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
}
}
-void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
+void LLPanelGroupGeneral::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);