summaryrefslogtreecommitdiff
path: root/indra/newview/llenvmanager.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-06-02 18:56:49 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-06-02 18:56:49 +0300
commite184c7598680f2069e2bcf5caa3c86967d7ab0a1 (patch)
treed81f175d87211813b4da62c200ccd9d79a43fc94 /indra/newview/llenvmanager.cpp
parentdda7df4ac94d1e269aa0ce9eff6c6078f756cbd9 (diff)
STORM-1253 WIP Changed the workflow to modify region day cycle.
Was: Press "Save" after editing the region day cycle in the Day Cycle Editor. Now: - Press "Save" in the Day Cycle Editor. - Open Region / Estate -> Environment tab. - Select the region day cycle. - Press "Apply".
Diffstat (limited to 'indra/newview/llenvmanager.cpp')
-rw-r--r--indra/newview/llenvmanager.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index dd8db7b785..8e4b7197d6 100644
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -666,7 +666,14 @@ std::string LLEnvManagerNew::getDayCycleName() const
const LLEnvironmentSettings& LLEnvManagerNew::getRegionSettings() const
{
- return mCachedRegionPrefs;
+ return !mNewRegionPrefs.isEmpty() ? mNewRegionPrefs : mCachedRegionPrefs;
+}
+
+void LLEnvManagerNew::setRegionSettings(const LLEnvironmentSettings& new_settings)
+{
+ // Set region settings override that will be used locally
+ // until user either uploads the changes or goes to another region.
+ mNewRegionPrefs = new_settings;
}
bool LLEnvManagerNew::usePrefs()
@@ -958,6 +965,10 @@ void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
void LLEnvManagerNew::onRegionSettingsApplyResponse(bool ok)
{
LL_DEBUGS("Windlight") << "Applying region settings " << (ok ? "succeeded" : "failed") << LL_ENDL;
+
+ // Clear locally modified region settings because they have just been uploaded.
+ mNewRegionPrefs.clear();
+
mRegionSettingsAppliedSignal(ok);
}
@@ -991,6 +1002,9 @@ void LLEnvManagerNew::onRegionChange(bool interpolate)
return;
}
+ // Clear locally modified region settings.
+ mNewRegionPrefs.clear();
+
// *TODO: clear environment settings of the previous region?
// Request environment settings of the new region.