summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-01-14 17:29:56 +0200
committerMike Antipov <mantipov@productengine.com>2010-01-14 17:29:56 +0200
commit44e1f34f962c0e75172286b63f3514c60fee536b (patch)
tree98e154b36789cb8fbb7ecd964d1c076192c24d3c
parentf606a5b300a5f4a84523761df4ba6f5198c06c10 (diff)
Work on major bug EXT-3976 (Voice chat speaking indicators should only display when users are in the same voice channel)
-- refactoring: implemented processing of switching indicator on/off in the same way --HG-- branch : product-engine
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp31
1 files changed, 8 insertions, 23 deletions
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 80477c1041..47e519df8d 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -279,34 +279,19 @@ void LLOutputMonitorCtrl::onChange()
// virtual
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
{
- if (switch_on)
+ setVisible(TRUE);
+
+ if (getParent() && getParent()->isInVisibleChain())
{
+ LL_DEBUGS("SpeakingIndicator") << "Indicator is in visible chain, notifying parent: " << mSpeakerId << LL_ENDL;
setVisible((BOOL)switch_on);
- if (getParent() && getParent()->isInVisibleChain())
- {
- notifyParentVisibilityChanged();
- }
- else
- {
- LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL;
- mIsSwitchDirty = true;
- mShouldSwitchOn = true;
- }
+ notifyParentVisibilityChanged();
}
else
{
- if (getParent() && getParent()->isInVisibleChain())
- {
- LL_DEBUGS("SpeakingIndicator") << "Indicator is in visible chain, notifying parent: " << mSpeakerId << LL_ENDL;
- setVisible((BOOL)switch_on);
- notifyParentVisibilityChanged();
- }
- else
- {
- LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL;
- mIsSwitchDirty = true;
- mShouldSwitchOn = false;
- }
+ LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL;
+ mIsSwitchDirty = true;
+ mShouldSwitchOn = switch_on;
}
}