summaryrefslogtreecommitdiff
path: root/indra/newview/llwlparammanager.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-05-24 19:05:41 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-05-24 19:05:41 +0300
commit047f69bf618fa525410dc512977e384cbbdb4d11 (patch)
tree6037205c802bc5b18e7ced5aa77ac48391ff620c /indra/newview/llwlparammanager.cpp
parent9c2c6c7a6c48753e722748a7ae5cd4e2174f5630 (diff)
STORM-1256 WIP Fixed resetting the Environment tab if a server env. update comes while your preference is using personal env. settings.
The fix is to re-add server skies to our WL param mgr regardless of user preferences.
Diffstat (limited to 'indra/newview/llwlparammanager.cpp')
-rw-r--r--indra/newview/llwlparammanager.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 16abe2b174..ec7889cb93 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -589,10 +589,12 @@ void LLWLParamManager::applyUserPrefs(bool interpolate)
// Remove all region sky presets because they may belong to a previously visited region.
clearParamSetsOfScope(LLEnvKey::SCOPE_REGION);
+ // Add all sky presets belonging to the current region.
+ const LLEnvironmentSettings& region_settings = LLEnvManagerNew::instance().getRegionSettings();
+ addAllSkies(LLEnvKey::SCOPE_REGION, region_settings.getSkyMap());
+
if (LLEnvManagerNew::instance().getUseRegionSettings()) // apply region-wide settings
{
- const LLEnvironmentSettings& region_settings = LLEnvManagerNew::instance().getRegionSettings();
-
if (region_settings.getSkyMap().size() == 0)
{
applyDefaults();
@@ -602,9 +604,6 @@ void LLWLParamManager::applyUserPrefs(bool interpolate)
// *TODO: Support fixed sky from region.
LL_DEBUGS("Windlight") << "Applying region sky" << LL_ENDL;
- // Add all sky presets belonging to the current region.
- addAllSkies(LLEnvKey::SCOPE_REGION, region_settings.getSkyMap());
-
// Apply region day cycle.
mDay.loadDayCycle(region_settings.getWLDayCycle(), LLEnvKey::SCOPE_REGION);
resetAnimator(region_settings.getDayTime(), true);