From 3e87997886458a95ec8814ad9d320bd088f33829 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 3 Sep 2010 09:07:10 -0700 Subject: Fixed the advanced sky/water flyout buttons not working correctly when just clicked --- linden/indra/newview/llfloaterwater.cpp | 34 ++++++++++++++--------------- linden/indra/newview/llfloaterwindlight.cpp | 34 ++++++++++++++--------------- 2 files changed, 34 insertions(+), 34 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llfloaterwater.cpp b/linden/indra/newview/llfloaterwater.cpp index 05bc001..c4b6d0d 100644 --- a/linden/indra/newview/llfloaterwater.cpp +++ b/linden/indra/newview/llfloaterwater.cpp @@ -649,23 +649,7 @@ void LLFloaterWater::onSavePreset(LLUICtrl* ctrl, void* userData) return; } - if (ctrl->getValue().asString() == "save_disk_item") - { - LLWaterParamManager::instance()->mCurParams.mName = - comboBox->getSelectedItemLabel(); - - // check to see if it's a default and shouldn't be overwritten - std::set::iterator sIt = sDefaultPresets.find( - comboBox->getSelectedItemLabel()); - if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets")) - { - LLNotifications::instance().add("WLNoEditDefault"); - return; - } - - LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); - } - else if (ctrl->getValue().asString() == "save_inventory_item") + if (ctrl->getValue().asString() == "save_inventory_item") { // Check if this is already a notecard. if(LLWaterParamManager::instance()->mCurParams.mInventoryID.notNull()) @@ -696,6 +680,22 @@ void LLFloaterWater::onSavePreset(LLUICtrl* ctrl, void* userData) } } + else + { + LLWaterParamManager::instance()->mCurParams.mName = + comboBox->getSelectedItemLabel(); + + // check to see if it's a default and shouldn't be overwritten + std::set::iterator sIt = sDefaultPresets.find( + comboBox->getSelectedItemLabel()); + if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets")) + { + LLNotifications::instance().add("WLNoEditDefault"); + return; + } + + LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); + } } bool LLFloaterWater::saveNotecardCallback(const LLSD& notification, const LLSD& response) diff --git a/linden/indra/newview/llfloaterwindlight.cpp b/linden/indra/newview/llfloaterwindlight.cpp index ae94d3a..be3c1fd 100644 --- a/linden/indra/newview/llfloaterwindlight.cpp +++ b/linden/indra/newview/llfloaterwindlight.cpp @@ -843,23 +843,7 @@ void LLFloaterWindLight::onSavePreset(LLUICtrl* ctrl, void* userData) return; } - if (ctrl->getValue().asString() == "save_disk_item") - { - // check to see if it's a default and shouldn't be overwritten - std::set::iterator sIt = sDefaultPresets.find( - comboBox->getSelectedItemLabel()); - if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("SkyEditPresets")) - { - LLNotifications::instance().add("WLNoEditDefault"); - return; - } - - LLWLParamManager::instance()->mCurParams.mName = - comboBox->getSelectedItemLabel(); - - LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); - } - else if (ctrl->getValue().asString() == "save_inventory_item") + if (ctrl->getValue().asString() == "save_inventory_item") { // Check if this is already a notecard. if(LLWLParamManager::instance()->mCurParams.mInventoryID.notNull()) @@ -890,6 +874,22 @@ void LLFloaterWindLight::onSavePreset(LLUICtrl* ctrl, void* userData) } } + else + { + // check to see if it's a default and shouldn't be overwritten + std::set::iterator sIt = sDefaultPresets.find( + comboBox->getSelectedItemLabel()); + if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("SkyEditPresets")) + { + LLNotifications::instance().add("WLNoEditDefault"); + return; + } + + LLWLParamManager::instance()->mCurParams.mName = + comboBox->getSelectedItemLabel(); + + LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); + } } bool LLFloaterWindLight::saveNotecardCallback(const LLSD& notification, const LLSD& response) -- cgit v1.1