From 8740368b0bab2ff9c0bbdb31b0da240e9e927e22 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 23 Oct 2018 17:52:00 +0300 Subject: =?UTF-8?q?SL-9922=20FIXED=20[EEP]=20The=20Day=20environment=20set?= =?UTF-8?q?tings=20are=20changed=20when=20open=20the=20Water=20setting=20i?= =?UTF-8?q?n=20=E2=80=98Fixed=20Environment=E2=80=99=20editor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llenvironment.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra') 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); -- cgit v1.2.3