summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterenvironmentadjust.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-04-15 22:19:15 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-04-15 22:19:15 +0300
commit06a76eda6af9fbe36e40a749c44e590ad6cfe363 (patch)
tree8e269e6e11880d316c9358c6654479c17f644b08 /indra/newview/llfloaterenvironmentadjust.cpp
parentae931987356a71dbe8fc7ec31f2a2fe9108b4495 (diff)
parent293462d8ff6dcb00ec501d026a6589d869a2f846 (diff)
Merge branch 'develop' into marchcat/05-develop
Diffstat (limited to 'indra/newview/llfloaterenvironmentadjust.cpp')
-rw-r--r--indra/newview/llfloaterenvironmentadjust.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp
index 35f8340997..58616995d3 100644
--- a/indra/newview/llfloaterenvironmentadjust.cpp
+++ b/indra/newview/llfloaterenvironmentadjust.cpp
@@ -455,9 +455,29 @@ void LLFloaterEnvironmentAdjust::onMoonAzimElevChanged()
void LLFloaterEnvironmentAdjust::onCloudMapChanged()
{
if (!mLiveSky)
+ {
return;
- mLiveSky->setCloudNoiseTextureId(getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->getValue().asUUID());
- mLiveSky->update();
+ }
+
+ LLTextureCtrl* picker_ctrl = getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP);
+
+ LLUUID new_texture_id = picker_ctrl->getValue().asUUID();
+
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+
+ LLSettingsSky::ptr_t sky_to_set = mLiveSky->buildClone();
+ if (!sky_to_set)
+ {
+ return;
+ }
+
+ sky_to_set->setCloudNoiseTextureId(new_texture_id);
+
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, sky_to_set);
+
+ LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT, true);
+
+ picker_ctrl->setValue(new_texture_id);
}
void LLFloaterEnvironmentAdjust::onWaterMapChanged()