summaryrefslogtreecommitdiff
path: root/indra/newview/llspeakingindicatormanager.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-02-24 11:53:10 +0200
committerMike Antipov <mantipov@productengine.com>2010-02-24 11:53:10 +0200
commit2ad421cef67b12fad0f854b252f9d4d4e9025fd4 (patch)
tree7dfe692d85d6980b3977e3936df80fe94ca1e96a /indra/newview/llspeakingindicatormanager.cpp
parent2fc5956d9d65b0139549d471b48464090843fdee (diff)
Work on major bug EXT-5562 (Misleading Active Voice Indicators in Group Chat Window, when Speakers are in Spatial Chat Only)
Completed -- code improvements: updated condition to store really switched on indicators for future switching off. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llspeakingindicatormanager.cpp')
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index 3c660f4d6a..cc06179481 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -238,6 +238,7 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea
indicator_range_t it_range = mSpeakingIndicators.equal_range(*it_uuid);
indicator_const_iterator it_indicator = it_range.first;
bool was_found = false;
+ bool was_switched_on = false;
for (; it_indicator != it_range.second; ++it_indicator)
{
was_found = true;
@@ -251,17 +252,22 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea
switch_current_on = indicator->getTargetSessionID() == session_id;
LL_DEBUGS("SpeakingIndicator") << "Session: " << session_id << ", target: " << indicator->getTargetSessionID() << ", the same? = " << switch_current_on << LL_ENDL;
}
+ was_switched_on = was_switched_on || switch_current_on;
indicator->switchIndicator(switch_current_on);
+
}
if (was_found)
{
LL_DEBUGS("SpeakingIndicator") << mSpeakingIndicators.count(*it_uuid) << " indicators where found" << LL_ENDL;
- // *TODO: it is possible non of the registered indicators are in the target session
- // we can avoid of storing such UUID in the mSwitchedIndicatorsOn map in this case.
- if (switch_on)
+ if (switch_on && !was_switched_on)
+ {
+ LL_DEBUGS("SpeakingIndicator") << "but non of them where switched on" << LL_ENDL;
+ }
+
+ if (was_switched_on)
{
// store switched on indicator to be able switch it off
mSwitchedIndicatorsOn.insert(*it_uuid);