summaryrefslogtreecommitdiff
path: root/indra/newview/lloutputmonitorctrl.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-03-05 20:14:21 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-03-05 20:14:21 +0200
commit3b3e4833ad41993785ea2fcae651b588df8e492d (patch)
tree67185c32edf04d1fab14ceeb5a2d387d067fc76c /indra/newview/lloutputmonitorctrl.cpp
parentf76812b29a424e9d9c609b49c10a8c6a332a5b04 (diff)
SL-10686 Refresh indicators on session change, fix visibility
Diffstat (limited to 'indra/newview/lloutputmonitorctrl.cpp')
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index c5e4593b79..a873ccf98b 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -74,6 +74,7 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)
mSpeakerId(p.speaker_id),
mIsModeratorMuted(false),
mIsAgentControl(false),
+ mIsActiveChannel(false),
mIndicatorToggled(false),
mShowParticipantsSpeaking(false)
{
@@ -256,6 +257,16 @@ BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
return TRUE;
}
+void LLOutputMonitorCtrl::setIsActiveChannel(bool val)
+{
+ mIsActiveChannel = val;
+ if (!val)
+ {
+ // switchIndicator will set it to TRUE when channel becomes active
+ setVisible(FALSE);
+ }
+}
+
void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/, bool show_other_participants_speaking /* = false */)
{
if (speaker_id.isNull() && mSpeakerId.notNull())
@@ -305,8 +316,7 @@ void LLOutputMonitorCtrl::onChange()
// virtual
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
{
-
- if(getVisible() != (BOOL)switch_on)
+ if (mIsActiveChannel && getVisible() != (BOOL)switch_on)
{
setVisible(switch_on);