summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpaneleditsky.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index a069d6655f..2e26b69144 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -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);