EXT-6402 - Add support for enable/disable of Plugins (Flash) within WebKit to Viewer Prefs

had to fix how radio groups bind to saved settings to support changing radio item order

tested all existing radio groups bound to a saved setting

reviewed by Callum
meow-7.2.2
Richard Nelson 2010-03-17 17:46:15 -07:00
parent 6a15ff2289
commit 121114f934
1 changed files with 3 additions and 5 deletions

View File

@ -106,7 +106,6 @@ LLRadioGroup::LLRadioGroup(const LLRadioGroup::Params& p)
void LLRadioGroup::initFromParams(const Params& p)
{
LLUICtrl::initFromParams(p);
for (LLInitParam::ParamIterator<ItemParams>::const_iterator it = p.items().begin();
it != p.items().end();
++it)
@ -124,6 +123,9 @@ void LLRadioGroup::initFromParams(const Params& p)
LLRadioCtrl* item = LLUICtrlFactory::create<LLRadioCtrl>(item_params, this);
mRadioButtons.push_back(item);
}
// call this *after* setting up mRadioButtons so we can handle setValue() calls
LLUICtrl::initFromParams(p);
}
@ -138,10 +140,6 @@ BOOL LLRadioGroup::postBuild()
{
mRadioButtons[0]->setTabStop(true);
}
if (mControlVariable)
{
setSelectedIndex(mControlVariable->getValue().asInteger());
}
return TRUE;
}