From 94c24b8713b72b6ce52637644ff18b234a3a400a Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Thu, 23 Aug 2018 20:14:15 +0300
Subject: [PATCH] MAINT-8944 Fix frame transition's images

---
 indra/llinventory/llsettingssky.cpp        |  5 ++++-
 indra/llinventory/llsettingswater.cpp      | 10 ++++++++--
 indra/llinventory/llsettingswater.h        |  2 ++
 indra/newview/llfloatereditextdaycycle.cpp | 10 +++++-----
 4 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 184a75b9c7e..dbf91178820 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -401,7 +401,10 @@ LLSettingsSky::LLSettingsSky():
 void LLSettingsSky::replaceSettings(LLSD settings)
 {
     LLSettingsBase::replaceSettings(settings);
-
+    mNextSunTextureId.setNull();
+    mNextMoonTextureId.setNull();
+    mNextCloudTextureId.setNull();
+    mNextBloomTextureId.setNull();
 }
 
 void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf) 
diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp
index f0d63bf033c..652e211ac47 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -185,10 +185,16 @@ void LLSettingsWater::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
     }
     else
     {
-        LL_WARNS("SETTINGS") << "Cound not cast end settings to water. No blend performed." << LL_ENDL;
+        LL_WARNS("SETTINGS") << "Could not cast end settings to water. No blend performed." << LL_ENDL;
     }
     setBlendFactor(blendf);
-    mNextNormalMapID = other->getNormalMapID();
+}
+
+void LLSettingsWater::replaceSettings(LLSD settings)
+{
+    LLSettingsBase::replaceSettings(settings);
+    mNextNormalMapID.setNull();
+    mNextTransparentTextureID.setNull();
 }
 
 LLSettingsWater::validation_list_t LLSettingsWater::getValidationList() const
diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h
index b33b082bbf3..11d7150ba95 100644
--- a/indra/llinventory/llsettingswater.h
+++ b/indra/llinventory/llsettingswater.h
@@ -64,6 +64,8 @@ class LLSettingsWater : public LLSettingsBase
     // Settings status 
     virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE;
 
+    virtual void replaceSettings(LLSD settings) SETTINGS_OVERRIDE;
+
     static LLSD defaults(const LLSettingsBase::TrackPosition& position = 0.0f);
 
     //---------------------------------------------------------------------
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 9fc4541c026..6a328b2e854 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -616,11 +616,6 @@ void LLFloaterEditExtDayCycle::onFrameSliderCallback(const LLSD &data)
             }
         }
     }
-
-    mTimeSlider->setCurSliderValue(sliderpos);
-
-    updateTabs();
-    LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
 }
 
 void LLFloaterEditExtDayCycle::onFrameSliderDoubleClick(S32 x, S32 y, MASK mask)
@@ -647,6 +642,11 @@ void LLFloaterEditExtDayCycle::onFrameSliderMouseDown(S32 x, S32 y, MASK mask)
             mFramesSlider->resetCurSlider();
         }
     }
+
+    mTimeSlider->setCurSliderValue(sliderpos);
+
+    updateTabs();
+    LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
 }
 
 void LLFloaterEditExtDayCycle::onFrameSliderMouseUp(S32 x, S32 y, MASK mask)
-- 
GitLab