summaryrefslogtreecommitdiff
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
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
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp2
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp12
2 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 9ab943de9c..d6d48a4ead 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -317,7 +317,7 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
//////////////////////////////////////////////////////////////////////////
void LLOutputMonitorCtrl::notifyParentVisibilityChanged()
{
- LL_DEBUGS("SpeakingIndicator") << "Notify parent that visibility was changed: " << mSpeakerId << " ,new_visibility: " << getVisible() << LL_ENDL;
+ LL_DEBUGS("SpeakingIndicator") << "Notify parent that visibility was changed: " << mSpeakerId << ", new_visibility: " << getVisible() << LL_ENDL;
LLSD params = LLSD().with("visibility_changed", getVisible());
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);