summaryrefslogtreecommitdiff
path: root/indra/newview/llparticipantlist.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-11-30 13:51:52 +0200
committerMike Antipov <mantipov@productengine.com>2009-11-30 13:51:52 +0200
commit7ea44f8addc8fc7218e7030b11f62ea5a3f99511 (patch)
tree27fb9d2d77098974f4adf3c30b48f380dda84e08 /indra/newview/llparticipantlist.cpp
parent53583548693a03385bab14029b9d0e2a7606d2e9 (diff)
Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel))
-- Excluded Agent's item from the Participant List --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llparticipantlist.cpp')
-rw-r--r--indra/newview/llparticipantlist.cpp13
1 files changed, 11 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
//