summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-04-09 15:19:11 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-04-09 15:19:11 +0300
commitcf31494b5053283b4d445b0c564b5e7d57af2a18 (patch)
treea1cada4d180b02adedb3b905b079f3dd4308f702
parenta7dce3f811bec56204736b6223cd67431bc20f99 (diff)
done EXT-6688 Implement Revert button funtionality (Edit Outfit panel)
On revert the base outfit is worn Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/205/ --HG-- branch : product-engine
-rw-r--r--indra/newview/llappearancemgr.cpp8
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llpaneloutfitedit.cpp2
3 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 0bd95987d7..4a30ba3066 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1579,6 +1579,14 @@ bool LLAppearanceMgr::updateBaseOutfit()
return true;
}
+void LLAppearanceMgr::wearBaseOutfit()
+{
+ const LLUUID& base_outfit_id = getBaseOutfitUUID();
+ if (base_outfit_id.isNull()) return;
+
+ updateCOF(base_outfit_id);
+}
+
//#define DUMP_CAT_VERBOSE
void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index befad591bd..d67a7787d3 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -129,6 +129,8 @@ public:
// Create initial outfits from library.
void autopopulateOutfits();
+ void wearBaseOutfit();
+
// Overrides the base outfit with the content from COF
// @return false if there is no base outfit
bool updateBaseOutfit();
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 2e94eabb3f..d1e6d7de42 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -232,6 +232,8 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetAction("remove_item_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);
+ childSetAction("revert_btn", boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
+
childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
childSetAction("save_as_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this));