From 320b7bacc2ef34b1434178cce8eb2818493fec21 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 4 Dec 2018 18:51:44 +0200 Subject: SL-10149 FIXED 'Mute when minimized' checkbox is displayed without focus on it after pressing on label in the "Preferences" floater --- indra/llui/llcheckboxctrl.h | 2 ++ indra/newview/llfloaterpreference.cpp | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'indra') diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index 5ce45b2135..71bdc32e66 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -92,6 +92,8 @@ public: // LLCheckBoxCtrl interface virtual BOOL toggle() { return mButton->toggleState(); } // returns new state + void setBtnFocus() { mButton->setFocus(TRUE); } + void setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; } void setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 92c9d1ae59..c66247b4b7 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2329,6 +2329,7 @@ BOOL LLPanelPreference::postBuild() if (hasChild("mute_chb_label", TRUE)) { getChild("mute_chb_label")->setShowCursorHand(false); + getChild("mute_chb_label")->setSoundFlags(LLView::MOUSE_UP); getChild("mute_chb_label")->setClickedCallback(boost::bind(&toggleMuteWhenMinimized)); } @@ -2452,6 +2453,11 @@ void LLPanelPreference::toggleMuteWhenMinimized() { std::string mute("MuteWhenMinimized"); gSavedSettings.setBOOL(mute, !gSavedSettings.getBOOL(mute)); + LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); + if (instance) + { + instance->getChild("mute_when_minimized")->setBtnFocus(); + } } void LLPanelPreference::cancel() -- cgit v1.2.3