summaryrefslogtreecommitdiff
path: root/indra/newview/lloutputmonitorctrl.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2019-03-22 17:31:26 +0200
committermaxim_productengine <mnikolenko@productengine.com>2019-03-22 17:31:26 +0200
commitbce1630e269c0f39f9fa9a5e0840154da6b0d727 (patch)
tree5dadc1d3104e45b8add413cc8cd1aed68bf7e1c5 /indra/newview/lloutputmonitorctrl.cpp
parentec9a70de94a3123142de1a1765968185846a8e17 (diff)
SL-10780 FIXED Speaker icon is shown for all friends
Diffstat (limited to 'indra/newview/lloutputmonitorctrl.cpp')
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index a873ccf98b..7f6c065bb9 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -74,9 +74,9 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)
mSpeakerId(p.speaker_id),
mIsModeratorMuted(false),
mIsAgentControl(false),
- mIsActiveChannel(false),
mIndicatorToggled(false),
- mShowParticipantsSpeaking(false)
+ mShowParticipantsSpeaking(false),
+ mChannelState(INACTIVE_CHANNEL)
{
//static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange);
//static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red);
@@ -259,8 +259,13 @@ BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
void LLOutputMonitorCtrl::setIsActiveChannel(bool val)
{
- mIsActiveChannel = val;
- if (!val)
+ setChannelState(val ? ACTIVE_CHANNEL : INACTIVE_CHANNEL);
+}
+
+void LLOutputMonitorCtrl::setChannelState(EChannelState state)
+{
+ mChannelState = state;
+ if (state == INACTIVE_CHANNEL)
{
// switchIndicator will set it to TRUE when channel becomes active
setVisible(FALSE);
@@ -316,7 +321,7 @@ void LLOutputMonitorCtrl::onChange()
// virtual
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
{
- if (mIsActiveChannel && getVisible() != (BOOL)switch_on)
+ if ((mChannelState != INACTIVE_CHANNEL) && (getVisible() != (BOOL)switch_on))
{
setVisible(switch_on);