STORM-1180 FIX Temporarily disabled region environment controls.
Besides, adding a workaround for a crash on exit I've experienced.meow-7.2.2
parent
fa87eaa1b0
commit
fc71ae3e69
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue