summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitedit.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-25 00:52:03 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-25 00:52:03 +0300
commit293272c2c7e2758fc27ce386e88bc494e62c9f3d (patch)
tree1ba6a0e13c8a9b07581df8a2f83e9963c22c22f2 /indra/newview/llpaneloutfitedit.cpp
parentded1f85b2811a51c61b140be6862ba479c02b5a8 (diff)
parent467d8339c970c253dada2cf0e1eed45be66593ac (diff)
Merge branch 'master' into DRTVWR-521-maint
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rw-r--r--indra/newview/llpaneloutfitedit.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 984fb49c83..35582d2967 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -58,7 +58,6 @@
#include "llmenubutton.h"
#include "llpaneloutfitsinventory.h"
#include "lluiconstants.h"
-#include "llsaveoutfitcombobtn.h"
#include "llscrolllistctrl.h"
#include "lltextbox.h"
#include "lltoggleablemenu.h"
@@ -80,6 +79,8 @@ const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LL
const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK;
static const std::string REVERT_BTN("revert_btn");
+static const std::string SAVE_AS_BTN("save_as_btn");
+static const std::string SAVE_BTN("save_btn");
///////////////////////////////////////////////////////////////////////////////
@@ -563,7 +564,8 @@ BOOL LLPanelOutfitEdit::postBuild()
mGearMenu = LLPanelOutfitEditGearMenu::create();
mGearMenuBtn->setMenu(mGearMenu);
- mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
+ getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
+ getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
onOutfitChanging(gAgentWearables.isCOFChangeInProgress());
return TRUE;
@@ -1240,11 +1242,9 @@ void LLPanelOutfitEdit::updateVerbs()
bool outfit_locked = LLAppearanceMgr::getInstance()->isOutfitLocked();
bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull();
- mSaveComboBtn->setSaveBtnEnabled(!outfit_locked && outfit_is_dirty);
+ getChildView(SAVE_BTN)->setEnabled(!outfit_locked && outfit_is_dirty);
getChildView(REVERT_BTN)->setEnabled(outfit_is_dirty && has_baseoutfit);
- mSaveComboBtn->setMenuItemEnabled("save_outfit", !outfit_locked && outfit_is_dirty);
-
mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing"));
updateCurrentOutfitName();
@@ -1430,4 +1430,13 @@ void LLPanelOutfitEdit::saveListSelection()
}
}
+void LLPanelOutfitEdit::saveOutfit(bool as_new)
+{
+ LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance();
+ if (panel_outfits_inventory)
+ {
+ panel_outfits_inventory->saveOutfit(as_new);
+ }
+}
+
// EOF