From 0d6af2a01d64c44a3874446c5c9a4ede71d8a98e Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Mon, 21 Dec 2009 19:45:20 +0200
Subject: [PATCH] Additional commit for EXT-3581: the code of updating of
 speakers order is moved to a separate method

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp         | 4 ++++
 indra/newview/llpanelimcontrolpanel.cpp | 5 ++---
 indra/newview/llparticipantlist.cpp     | 4 ++++
 indra/newview/llparticipantlist.h       | 5 +++++
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 1acdb96da6d..2521bde8fa1 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -153,6 +153,10 @@ void LLCallFloater::draw()
 		setModeratorMutedVoice(is_moderator_muted);
 	}
 
+	// Need to resort the participant list if it's in sort by recent speaker order.
+	if (mPaticipants)
+		mPaticipants->updateRecentSpeakersOrder();
+
 	LLDockableFloater::draw();
 }
 
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 8d03f9e6865..3f309b3bf58 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -247,10 +247,9 @@ void LLPanelGroupControlPanel::draw()
 	//Remove event does not raised until speakerp->mActivityTimer.hasExpired() is false, see LLSpeakerManager::update()
 	//so we need update it to raise needed event
 	mSpeakerManager->update(true);
-	// Need to refresh participants to display ones not in voice as disabled and 
-	// resort the avatar list if it's in sort by recent speaker order.
+	// Need to resort the participant list if it's in sort by recent speaker order.
 	if (mParticipantList)
-		mParticipantList->refreshVoiceState();
+		mParticipantList->updateRecentSpeakersOrder();
 	LLPanelChatControlPanel::draw();
 }
 
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 8fb4063ea7d..dfe0b504bd4 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -227,6 +227,10 @@ void LLParticipantList::refreshVoiceState()
 			item->setOnline(!is_in_voice);
 		}
 	}
+}
+
+void LLParticipantList::updateRecentSpeakersOrder()
+{
 	if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder())
 	{
 		// Resort avatar list
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 21eda86edd3..515529452bd 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -65,6 +65,11 @@ class LLParticipantList
 		 */
 		void refreshVoiceState();
 
+		/**
+		 * Refreshes the participant list if it's in sort by recent speaker order.
+		 */
+		void updateRecentSpeakersOrder();
+
 	protected:
 		/**
 		 * LLSpeakerMgr event handlers
-- 
GitLab