diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llui/llradiogroup.cpp | 12 |
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]; |