diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-05-06 11:00:47 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-05-06 11:00:47 -0400 |
commit | 2d8b53854ebc1db5cceda1e1b5d6abbbc6c08728 (patch) | |
tree | 56388b12b66b42059841faeadac6f110abc18d21 /indra/llui/llradiogroup.cpp | |
parent | e0cb5438a5055c71191c6ae6b27c7dee63e40562 (diff) | |
parent | 94559950a2c670990db56bd74e65d26652421b8c (diff) |
merge
Diffstat (limited to 'indra/llui/llradiogroup.cpp')
-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]; |