diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.h | 4 | ||||
-rw-r--r-- | indra/newview/llpaneleditsky.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llpaneleditwater.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml | 2 |
6 files changed, 23 insertions, 16 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index bae901bd50..89c3ca90f0 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1613,8 +1613,8 @@ void LLFloaterEditExtDayCycle::setTabsData(LLTabContainer * tabcontainer, const LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(tabcontainer->getPanelByIndex(idx)); if (panel) { - panel->setSettings(settings); panel->setCanChangeSettings(editable & mCanMod); + panel->setSettings(settings); } } } diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index a94b7c219f..f852cc7395 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -214,8 +214,8 @@ void LLFloaterFixedEnvironment::refresh() LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(mTab->getPanelByIndex(idx)); if (panel) { - panel->refresh(); panel->setCanChangeSettings(mCanMod); + panel->refresh(); } } } @@ -851,9 +851,3 @@ void LLFloaterFixedEnvironmentSky::loadSkySettingFromFile(const std::vector<std: } //========================================================================= - -void LLSettingsEditPanel::setCanChangeSettings(bool enabled) -{ - setEnabled(enabled); - setAllChildrenEnabled(enabled); -} diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h index 138f26cfd7..b27ec4b8e6 100644 --- a/indra/newview/llfloaterfixedenvironment.h +++ b/indra/newview/llfloaterfixedenvironment.h @@ -183,7 +183,8 @@ public: inline void setIsDirty() { mIsDirty = true; if (!mOnDirtyChanged.empty()) mOnDirtyChanged(this, mIsDirty); } inline void clearIsDirty() { mIsDirty = false; if (!mOnDirtyChanged.empty()) mOnDirtyChanged(this, mIsDirty); } - virtual void setCanChangeSettings(bool flag); + inline bool getCanChangeSettings() const { return mCanEdit; } + inline void setCanChangeSettings(bool flag) { mCanEdit = flag; } inline connection_t setOnDirtyFlagChanged(on_dirty_charged_sg::slot_type cb) { return mOnDirtyChanged.connect(cb); } @@ -197,6 +198,7 @@ protected: private: bool mIsDirty; + bool mCanEdit; on_dirty_charged_sg mOnDirtyChanged; }; diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index fdd365cc92..aaa54ed2e9 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -71,11 +71,16 @@ namespace const std::string FIELD_SKY_SUN_ROTATION("sun_rotation"); const std::string FIELD_SKY_SUN_IMAGE("sun_image"); const std::string FIELD_SKY_SUN_SCALE("sun_scale"); + const std::string FIELD_SKY_SUN_BEACON("sunbeacon"); + const std::string FIELD_SKY_MOON_BEACON("moonbeacon"); const std::string FIELD_SKY_MOON_ROTATION("moon_rotation"); const std::string FIELD_SKY_MOON_IMAGE("moon_image"); const std::string FIELD_SKY_MOON_SCALE("moon_scale"); const std::string FIELD_SKY_MOON_BRIGHTNESS("moon_brightness"); + const std::string PANEL_SKY_SUN_LAYOUT("sun_layout"); + const std::string PANEL_SKY_MOON_LAYOUT("moon_layout"); + const std::string FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL("rayleigh_exponential"); const std::string FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE("rayleigh_exponential_scale"); const std::string FIELD_SKY_DENSITY_RAYLEIGH_LINEAR("rayleigh_linear"); @@ -168,7 +173,7 @@ void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled) void LLPanelSettingsSkyAtmosTab::refresh() { - if (!mSkySettings) + if (!mSkySettings || !getCanChangeSettings()) { setAllChildrenEnabled(FALSE); setEnabled(FALSE); @@ -342,7 +347,7 @@ void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled) void LLPanelSettingsSkyCloudTab::refresh() { - if (!mSkySettings) + if (!mSkySettings || !getCanChangeSettings()) { setAllChildrenEnabled(FALSE); setEnabled(FALSE); @@ -480,15 +485,19 @@ void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled) getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setEnabled(enabled); getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setEnabled(enabled); getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setEnabled(enabled); + getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(TRUE); + getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(TRUE); } } void LLPanelSettingsSkySunMoonTab::refresh() { - if (!mSkySettings) + if (!mSkySettings || !getCanChangeSettings()) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + 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; } @@ -654,7 +663,7 @@ void LLPanelSettingsSkyDensityTab::setEnabled(BOOL enabled) void LLPanelSettingsSkyDensityTab::refresh() { - if (!mSkySettings) + if (!mSkySettings || !getCanChangeSettings()) { setAllChildrenEnabled(FALSE); setEnabled(FALSE); diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp index 1f9c79c9eb..d8b97b714b 100644 --- a/indra/newview/llpaneleditwater.cpp +++ b/indra/newview/llpaneleditwater.cpp @@ -130,7 +130,7 @@ void LLPanelSettingsWaterMainTab::setEnabled(BOOL enabled) //========================================================================== void LLPanelSettingsWaterMainTab::refresh() { - if (!mWaterSettings) + if (!mWaterSettings || !getCanChangeSettings()) { setAllChildrenEnabled(FALSE); setEnabled(FALSE); diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml index bbba5ba729..0e3de821d1 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml @@ -21,6 +21,7 @@ auto_resize="true" user_resize="false" visible="true" + name="sun_layout" height="400"> <text follows="left|top" @@ -209,6 +210,7 @@ auto_resize="true" user_resize="false" visible="true" + name="moon_layout" height="220"> <text follows="left|top" |