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/llfloaterwindlight.cpp | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'linden/indra/newview/llfloaterwindlight.cpp') 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