summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-07-29 07:57:01 -0700
committerGraham Linden <graham@lindenlab.com>2019-07-29 07:57:01 -0700
commit491057a89c7e21e3b3e02bc8f804ac553f9023b6 (patch)
tree3195a05d5be2f58ec61b3c5432750ade090106f1 /indra/newview
parenteb9a977a36742fb052b4d92c911c37816967cd6e (diff)
parent04db46b088b8d974f10ce0b5acdd35007f4bb060 (diff)
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpaneleditsky.cpp26
-rw-r--r--indra/newview/llpaneleditwater.cpp6
2 files changed, 17 insertions, 15 deletions
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 8bcc546133..a069d6655f 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -173,15 +173,15 @@ void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled)
void LLPanelSettingsSkyAtmosTab::refresh()
{
- if (!mSkySettings || !getCanChangeSettings())
+ if (!mSkySettings)
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);
return;
}
- setEnabled(TRUE);
- setAllChildrenEnabled(TRUE);
+ setEnabled(getCanChangeSettings());
+ setAllChildrenEnabled(getCanChangeSettings());
getChild<LLColorSwatchCtrl>(FIELD_SKY_AMBIENT_LIGHT)->set(mSkySettings->getAmbientColor() / SLIDER_SCALE_SUN_AMBIENT);
getChild<LLColorSwatchCtrl>(FIELD_SKY_BLUE_HORIZON)->set(mSkySettings->getBlueHorizon() / SLIDER_SCALE_BLUE_HORIZON_DENSITY);
@@ -359,15 +359,15 @@ void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled)
void LLPanelSettingsSkyCloudTab::refresh()
{
- if (!mSkySettings || !getCanChangeSettings())
+ if (!mSkySettings)
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);
return;
}
- setEnabled(TRUE);
- setAllChildrenEnabled(TRUE);
+ setEnabled(getCanChangeSettings());
+ setAllChildrenEnabled(getCanChangeSettings());
getChild<LLColorSwatchCtrl>(FIELD_SKY_CLOUD_COLOR)->set(mSkySettings->getCloudColor());
getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setValue(mSkySettings->getCloudShadow());
@@ -512,7 +512,7 @@ void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled)
void LLPanelSettingsSkySunMoonTab::refresh()
{
- if (!mSkySettings || !getCanChangeSettings())
+ if (!mSkySettings)
{
getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(FALSE);
getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(FALSE);
@@ -521,8 +521,10 @@ void LLPanelSettingsSkySunMoonTab::refresh()
return;
}
- 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);
@@ -693,15 +695,15 @@ void LLPanelSettingsSkyDensityTab::setEnabled(BOOL enabled)
void LLPanelSettingsSkyDensityTab::refresh()
{
- if (!mSkySettings || !getCanChangeSettings())
+ if (!mSkySettings)
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);
return;
}
- setEnabled(TRUE);
- setAllChildrenEnabled(TRUE);
+ setEnabled(getCanChangeSettings());
+ setAllChildrenEnabled(getCanChangeSettings());
// Get first (only) profile layer of each type for editing
LLSD rayleigh_config = mSkySettings->getRayleighConfig();
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index deba7f487f..a09964e17d 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -130,15 +130,15 @@ void LLPanelSettingsWaterMainTab::setEnabled(BOOL enabled)
//==========================================================================
void LLPanelSettingsWaterMainTab::refresh()
{
- if (!mWaterSettings || !getCanChangeSettings())
+ if (!mWaterSettings)
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);
return;
}
- setEnabled(TRUE);
- setAllChildrenEnabled(TRUE);
+ setEnabled(getCanChangeSettings());
+ setAllChildrenEnabled(getCanChangeSettings());
mClrFogColor->set(mWaterSettings->getWaterFogColor());
getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setValue(mWaterSettings->getWaterFogDensity());
getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setValue(mWaterSettings->getFogMod());