Merge pull request #3611 from Kingcom/Fix

Add another check to PopupMultiChoice
This commit is contained in:
Henrik Rydgård 2013-09-04 02:38:00 -07:00
commit 8e6b031d9b

View File

@ -63,6 +63,7 @@ public:
I18NCategory *category, ScreenManager *screenManager, LayoutParams *layoutParams = 0)
: Choice(text, "", false, layoutParams), value_(value), choices_(choices), minVal_(minVal), numChoices_(numChoices),
category_(category), screenManager_(screenManager) {
if (*value >= numChoices+minVal) *value = numChoices+minVal-1;
if (*value < minVal) *value = minVal;
OnClick.Handle(this, &PopupMultiChoice::HandleClick);
UpdateText();