summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-01-14 17:35:57 +0200
committerMike Antipov <mantipov@productengine.com>2010-01-14 17:35:57 +0200
commit2029bf92e2ba846274f99cb740cf0fade4ea2796 (patch)
treeeea33502e077b62f0ba6ecf2b234ebb14d1feb13 /indra
parent44e1f34f962c0e75172286b63f3514c60fee536b (diff)
Work on major bug EXT-3976 (Voice chat speaking indicators should only display when users are in the same voice channel)
-- improvements: added more comment for LLOutputMonitorCtrl::switchIndicator --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 47e519df8d..f816dc589d 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -279,14 +279,20 @@ void LLOutputMonitorCtrl::onChange()
// virtual
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
{
+ // ensure indicator is visible in case it is not in visible chain
+ // to be called when parent became visible next time to notify parent that visibility is changed.
setVisible(TRUE);
+ // if parent is in visible chain apply switch_on state and notify it immediately
if (getParent() && getParent()->isInVisibleChain())
{
LL_DEBUGS("SpeakingIndicator") << "Indicator is in visible chain, notifying parent: " << mSpeakerId << LL_ENDL;
setVisible((BOOL)switch_on);
notifyParentVisibilityChanged();
}
+
+ // otherwise remember necessary state and mark itself as dirty.
+ // State will be applied i next draw when parents chain became visible.
else
{
LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL;