summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitedit.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-07-23 07:10:26 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-07-23 07:10:26 +0300
commit638fe8757694b4039e8b88d83fb8b7b7cfafb1a4 (patch)
tree2c4fb2a4d4db5022c395bafde44e01666d08a868 /indra/newview/llpaneloutfitedit.cpp
parent7587f0dd88526e61a4741ad8e2d9894027de1ffb (diff)
parentbe6066eae218856f7fd74b98968a75e5062fa830 (diff)
Merge branch 'master' into DRTVWR-483
# Conflicts: # indra/newview/llpanelpicks.cpp # indra/newview/llpanelpicks.h # indra/newview/llviewerfloaterreg.cpp
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 28a020870f..5be9ab6095 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");
///////////////////////////////////////////////////////////////////////////////
@@ -562,7 +563,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;
@@ -1239,11 +1241,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();
@@ -1429,4 +1429,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