diff options
Diffstat (limited to 'linden/indra/newview/llfloaterwater.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterwater.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
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) | |||
649 | return; | 649 | return; |
650 | } | 650 | } |
651 | 651 | ||
652 | if (ctrl->getValue().asString() == "save_disk_item") | 652 | if (ctrl->getValue().asString() == "save_inventory_item") |
653 | { | ||
654 | LLWaterParamManager::instance()->mCurParams.mName = | ||
655 | comboBox->getSelectedItemLabel(); | ||
656 | |||
657 | // check to see if it's a default and shouldn't be overwritten | ||
658 | std::set<std::string>::iterator sIt = sDefaultPresets.find( | ||
659 | comboBox->getSelectedItemLabel()); | ||
660 | if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets")) | ||
661 | { | ||
662 | LLNotifications::instance().add("WLNoEditDefault"); | ||
663 | return; | ||
664 | } | ||
665 | |||
666 | LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); | ||
667 | } | ||
668 | else if (ctrl->getValue().asString() == "save_inventory_item") | ||
669 | { | 653 | { |
670 | // Check if this is already a notecard. | 654 | // Check if this is already a notecard. |
671 | if(LLWaterParamManager::instance()->mCurParams.mInventoryID.notNull()) | 655 | if(LLWaterParamManager::instance()->mCurParams.mInventoryID.notNull()) |
@@ -696,6 +680,22 @@ void LLFloaterWater::onSavePreset(LLUICtrl* ctrl, void* userData) | |||
696 | 680 | ||
697 | } | 681 | } |
698 | } | 682 | } |
683 | else | ||
684 | { | ||
685 | LLWaterParamManager::instance()->mCurParams.mName = | ||
686 | comboBox->getSelectedItemLabel(); | ||
687 | |||
688 | // check to see if it's a default and shouldn't be overwritten | ||
689 | std::set<std::string>::iterator sIt = sDefaultPresets.find( | ||
690 | comboBox->getSelectedItemLabel()); | ||
691 | if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets")) | ||
692 | { | ||
693 | LLNotifications::instance().add("WLNoEditDefault"); | ||
694 | return; | ||
695 | } | ||
696 | |||
697 | LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); | ||
698 | } | ||
699 | } | 699 | } |
700 | 700 | ||
701 | bool LLFloaterWater::saveNotecardCallback(const LLSD& notification, const LLSD& response) | 701 | bool LLFloaterWater::saveNotecardCallback(const LLSD& notification, const LLSD& response) |