From ef2b007a6b5f487a946d9930341591f3f1d0437e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 2 Feb 2016 15:52:38 +0200 Subject: MAINT-1632 FIXED Both radio-buttons are not selected Advanced tab of Preference --- indra/llui/llradiogroup.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index b53bb16d97..8cf72928ff 100755 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -179,6 +179,18 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) return FALSE; } + if (index < -1) + { + // less then minimum value + return FALSE; + } + + if (index < 0 && mSelectedIndex >= 0 && !mAllowDeselect) + { + // -1 is "nothing selected" + return FALSE; + } + if (mSelectedIndex >= 0) { LLRadioCtrl* old_radio_item = mRadioButtons[mSelectedIndex]; -- cgit v1.2.3