diff options
| author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-03-31 18:24:01 +0300 |
|---|---|---|
| committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-03-31 18:24:01 +0300 |
| commit | 38f87d0e21cfb6807e262e0289e1f6b08904a4e7 (patch) | |
| tree | 29fa2d175e9cd8931ec090b7f4f4177c884e5713 /indra/newview/llfloaterwindlight.cpp | |
| parent | 7419abc12ba07380593fa3c0571155b248b8c8a6 (diff) | |
STORM-1126 WIP Windlight Estate Settings integration: pass 6
* Made it possible to update a region sky preset with the Save button.
* Fixed resetting day cycle when you start editing region environment settings.
* Fixed: if you press "Cancel Changes" in the region envitonment settings
and then choose to resume editing in the confirmation dialog,
you won't be able to cancel your changes later.
Diffstat (limited to 'indra/newview/llfloaterwindlight.cpp')
| -rw-r--r-- | indra/newview/llfloaterwindlight.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index 04adf62733..5682bc1f17 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -790,9 +790,22 @@ void LLFloaterWindLight::onSavePreset(void* userData) return; } + // If region scope, save immediately. + // We don't actually save to file in this case, but just update the preset + // so that the changes can be uploaded to server. + LLWLParamKey key(comboBox->getSelectedValue()); + if (key.scope == LLEnvKey::SCOPE_REGION) + { + // *TODO: Eliminate code duplication. + LL_DEBUGS("Windlight") << "Saving region sky preset: " << key.name << llendl; + LLWLParamManager * param_mgr = LLWLParamManager::getInstance(); + param_mgr->mCurParams.mName = key.name; + param_mgr->setParamSet(key, param_mgr->mCurParams); + return; + } + // check to see if it's a default and shouldn't be overwritten - std::set<LLWLParamKey>::iterator sIt = sDefaultPresets.find( - LLWLParamKey(comboBox->getSelectedValue())); + std::set<LLWLParamKey>::iterator sIt = sDefaultPresets.find(LLWLParamKey(key)); if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("SkyEditPresets")) { LLNotifications::instance().add("WLNoEditDefault", LLSD(), LLSD()); |
