diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2018-10-23 17:52:00 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2018-10-23 17:52:00 +0300 |
commit | 8740368b0bab2ff9c0bbdb31b0da240e9e927e22 (patch) | |
tree | 00f0bb4f6751eb9aa22eec733af0c1bd43cc5721 /indra | |
parent | 2cee3e6ef4789c78fdcd59c1db093e78aeeb8511 (diff) |
SL-9922 FIXED [EEP] The Day environment settings are changed when open the Water setting in ‘Fixed Environment’ editor
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llenvironment.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 5e7e9937cd..ae625630eb 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -507,9 +507,19 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm DayInstance::ptr_t environment = getEnvironmentInstance(env, true); + LLSettingsSky::ptr_t prev_sky = mEnvironments[ENV_DEFAULT]->getSky(); + LLSettingsWater::ptr_t prev_water = mEnvironments[ENV_DEFAULT]->getWater(); + if (mCurrentEnvironment && (ENV_EDIT == env)) + { + prev_sky = mCurrentEnvironment->getSky() ? mCurrentEnvironment->getSky() : prev_sky; + prev_water = mCurrentEnvironment->getWater() ? mCurrentEnvironment->getWater() : prev_water; + } + environment->clear(); - environment->setSky((fixed.first) ? fixed.first : mEnvironments[ENV_DEFAULT]->getSky()); - environment->setWater((fixed.second) ? fixed.second : mEnvironments[ENV_DEFAULT]->getWater()); + environment->setSky((fixed.first) ? fixed.first : prev_sky); + environment->setWater((fixed.second) ? fixed.second : prev_water); + + if (!mSignalEnvChanged.empty()) mSignalEnvChanged(env); |