diff options
author | Rider Linden <rider@lindenlab.com> | 2017-11-10 16:17:25 -0800 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2017-11-10 16:17:25 -0800 |
commit | b37eb2642f6e6e4d1e32a49c7ab31f70321cd979 (patch) | |
tree | 3ec6bd8233525b5a96f0a0308f1d6100c59fb32f /indra/newview/llfloatereditwater.cpp | |
parent | d709c7f35ebfd1945fd036b859f56b349d01dfe7 (diff) |
Remove delete preset dialog, Initial settings for selection level (Region/Parcel/Local)
Diffstat (limited to 'indra/newview/llfloatereditwater.cpp')
-rw-r--r-- | indra/newview/llfloatereditwater.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/indra/newview/llfloatereditwater.cpp b/indra/newview/llfloatereditwater.cpp index 52c896d6aa..6b218d5008 100644 --- a/indra/newview/llfloatereditwater.cpp +++ b/indra/newview/llfloatereditwater.cpp @@ -111,7 +111,7 @@ void LLFloaterEditWater::onClose(bool app_quitting) { if (!app_quitting) // there's no point to change environment if we're quitting { - LLEnvironment::instance().clearAllSelected(); + LLEnvironment::instance().applyChosenEnvironment(); } } @@ -436,7 +436,6 @@ void LLFloaterEditWater::onWaterPresetSelected() bool LLFloaterEditWater::onSaveAnswer(const LLSD& notification, const LLSD& response) { -#if 0 S32 option = LLNotificationsUtil::getSelectedOption(notification, response); // If they choose save, do it. Otherwise, don't do anything @@ -444,46 +443,34 @@ bool LLFloaterEditWater::onSaveAnswer(const LLSD& notification, const LLSD& resp { onSaveConfirmed(); } -#endif - return false; + + return false; } void LLFloaterEditWater::onSaveConfirmed() { -#if 0 // Save currently displayed water params to the selected preset. - std::string name = getCurrentPresetName(); + std::string name = mEditSettings->getName(); LL_DEBUGS("Windlight") << "Saving sky preset " << name << LL_ENDL; - LLWaterParamManager& water_mgr = LLWaterParamManager::instance(); - if (water_mgr.hasParamSet(name)) - { - water_mgr.setParamSet(name, water_mgr.mCurParams); - } - else - { - water_mgr.addParamSet(name, water_mgr.mCurParams); - } - water_mgr.savePreset(name); + LLEnvironment::instance().addWater(mEditSettings); // Change preference if requested. if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue()) { LL_DEBUGS("Windlight") << name << " is now the new preferred water preset" << LL_ENDL; - LLEnvManagerNew::instance().setUseWaterPreset(name); + LLEnvironment::instance().setUserWater(mEditSettings); } closeFloater(); -#endif } void LLFloaterEditWater::onBtnSave() { - LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater(); - LLEnvironment::instance().addWater(pwater); + LLEnvironment::instance().addWater(mEditSettings); + LLEnvironment::instance().setUserWater(mEditSettings); - LLEnvironment::instance().applyWater(); closeFloater(); } |