SL-11273 FIXED [EEP] The beacon checkboxes in the Day Cycle window can only be changed while a keyframe is selected.

meow-7.2.2
maxim_productengine 2020-03-02 17:31:25 +02:00
parent 54ded36787
commit c40dd9917f
1 changed files with 9 additions and 7 deletions

View File

@ -512,19 +512,21 @@ void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled)
void LLPanelSettingsSkySunMoonTab::refresh()
{
if (!mSkySettings)
if (!mSkySettings || !getCanChangeSettings())
{
getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(FALSE);
getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(FALSE);
getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(TRUE);
getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(TRUE);
return;
if (!mSkySettings)
return;
}
else
{
setEnabled(TRUE);
setAllChildrenEnabled(TRUE);
}
setEnabled(getCanChangeSettings());
getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(getCanChangeSettings());
getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(getCanChangeSettings());
setAllChildrenEnabled(getCanChangeSettings());
getChild<LLColorSwatchCtrl>(FIELD_SKY_SUN_MOON_COLOR)->set(mSkySettings->getSunlightColor() / SLIDER_SCALE_SUN_AMBIENT);