summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-02-02 15:52:38 +0200
committerandreykproductengine <akleshchev@productengine.com>2016-02-02 15:52:38 +0200
commitef2b007a6b5f487a946d9930341591f3f1d0437e (patch)
treeaf974bfb3b50570de0b3039aef8b17eb614eb53f
parentf0e8bc099532d38d56e8ee135b6bc4d0f3691842 (diff)
MAINT-1632 FIXED Both radio-buttons are not selected Advanced tab of Preference
-rwxr-xr-xindra/llui/llradiogroup.cpp12
1 files changed, 12 insertions, 0 deletions
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];