summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llparticipantlist.cpp13
-rw-r--r--indra/newview/llparticipantlist.h5
2 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 68dc1b511f..07a1214b4f 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -87,7 +87,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++)
{
const LLPointer<LLSpeaker>& speakerp = *it;
- group_members.push_back(speakerp->mID);
+ addAvatarIDExceptAgent(group_members, speakerp->mID);
if ( speakerp->mIsModerator )
{
mModeratorList.insert(speakerp->mID);
@@ -192,7 +192,7 @@ bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, co
return true;
}
- group_members.push_back(uu_id);
+ addAvatarIDExceptAgent(group_members, uu_id);
// Mark AvatarList as dirty one
mAvatarList->setDirty();
sort();
@@ -260,6 +260,15 @@ void LLParticipantList::sort()
}
}
+// static
+void LLParticipantList::addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id)
+{
+ if (gAgent.getID() != avatar_id)
+ {
+ existing_list.push_back(avatar_id);
+ }
+}
+
//
// LLParticipantList::SpeakerAddListener
//
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index ce61dd9b96..460cf4b9ef 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -132,6 +132,11 @@ class LLParticipantList
void onAvatarListDoubleClicked(LLAvatarList* list);
void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param);
+ /**
+ * Adds specified avatar ID to the existing list if it is not Agent's ID
+ */
+ static void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id);
+
LLSpeakerMgr* mSpeakerMgr;
LLAvatarList* mAvatarList;