diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llenvmanager.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 14 |
2 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp index 687f9974b1..c855d8597c 100644 --- a/indra/newview/llenvmanager.cpp +++ b/indra/newview/llenvmanager.cpp @@ -302,7 +302,18 @@ bool LLEnvManager::processIncomingMessage(const LLSD& unvalidated_content, const if (valid) { - F32 sun_hour = LLPanelRegionTerrainInfo::instance()->getSunHour(); // this slider is kept up to date + F32 sun_hour = 0; + LLPanelRegionTerrainInfo* terrain_panel = LLPanelRegionTerrainInfo::instance(); + + if (terrain_panel) + { + sun_hour = terrain_panel->getSunHour(); // this slider is kept up to date + } + else + { + llwarns << "Cannot instantiate the terrain panel (exiting?)" << llendl; + } + LLWLParamManager::getInstance()->addAllSkies(scope, windlight_llsd[2]); LLEnvironmentSettings newSettings(windlight_llsd[1], windlight_llsd[2], windlight_llsd[3], sun_hour); mOrigSettingStore[scope] = newSettings; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 085d118c52..2acb0936dc 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -92,6 +92,8 @@ const S32 TERRAIN_TEXTURE_COUNT = 4; const S32 CORNER_COUNT = 4; +#define TMP_DISABLE_WLES // STORM-1180 + ///---------------------------------------------------------------------------- /// Local class declaration ///---------------------------------------------------------------------------- @@ -1217,6 +1219,7 @@ BOOL LLPanelRegionTerrainInfo::postBuild() childSetAction("upload_raw_btn", onClickUploadRaw, this); childSetAction("bake_terrain_btn", onClickBakeTerrain, this); +#ifdef TMP_DISABLE_WLES // WL advanced buttons childSetAction("EnvAdvancedSkyButton", onOpenAdvancedSky, this); childSetAction("EnvAdvancedWaterButton", onOpenAdvancedWater, this); @@ -1227,6 +1230,7 @@ BOOL LLPanelRegionTerrainInfo::postBuild() childSetAction("WLRegionCancel", onCancelRegionWL, this); childSetAction("WLRegionDefault", onSetRegionToDefaultWL, this); childSetAction("WLCurrentApply", onApplyCurrentWL, this); +#endif return TRUE; } @@ -1264,17 +1268,27 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) void LLPanelRegionTerrainInfo::setEnvControls(bool available) { +#ifdef TMP_DISABLE_WLES + available = false; + getChild<LLUICtrl>("wl_settings_unavailable")->setValue("Temporarily disabled."); +#endif + getChildView("EnvUseEstateTimeButton")->setVisible(available); getChildView("EnvAdvancedSkyButton")->setVisible(available); getChildView("EnvAdvancedWaterButton")->setVisible(available); getChildView("WLRegionApply")->setVisible(available); getChildView("WLRegionCancel")->setVisible(available); getChildView("WLRegionDefault")->setVisible(available); + getChildView("WLCurrentApply")->setVisible(available); getChildView("wl_settings_unavailable")->setVisible(!available); } void LLPanelRegionTerrainInfo::setCommitControls(bool available) { +#ifdef TMP_DISABLE_WLES + available = false; +#endif + getChildView("WLRegionApply")->setEnabled(available); getChildView("WLRegionCancel")->setEnabled(available); refresh(); |