From f48eca366aab7e2f92efb6e070436a2891316762 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 8 May 2013 00:47:55 -0400 Subject: [PATCH] Issue 773: Add option to update currently worn outfit --- indra/newview/llfloatercustomize.cpp | 1 + indra/newview/llinventoryactions.cpp | 8 +++++--- .../newview/skins/default/xui/en-us/floater_customize.xml | 1 + .../newview/skins/default/xui/en-us/floater_inventory.xml | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 0c3046680..c61d05f74 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -189,6 +189,7 @@ LLFloaterCustomize::~LLFloaterCustomize() BOOL LLFloaterCustomize::postBuild() { getChild("Make Outfit")->setCommitCallback(boost::bind(&LLFloaterCustomize::onBtnMakeOutfit, this)); + getChild("Save Outfit")->setCommitCallback(boost::bind(&LLAppearanceMgr::updateBaseOutfit, LLAppearanceMgr::getInstance())); getChild("Ok")->setCommitCallback(boost::bind(&LLFloaterCustomize::onBtnOk, this)); getChild("Cancel")->setCommitCallback(boost::bind(&LLFloater::onClickClose, this)); diff --git a/indra/newview/llinventoryactions.cpp b/indra/newview/llinventoryactions.cpp index ed0c6c54e..fe07063bb 100644 --- a/indra/newview/llinventoryactions.cpp +++ b/indra/newview/llinventoryactions.cpp @@ -31,11 +31,14 @@ */ #include "llviewerprecompiledheaders.h" + #include "llagentwearables.h" +#include "llappearancemgr.h" +#include "llfoldervieweventlistener.h" #include "llimview.h" -#include "llinventoryfunctions.h" #include "llinventorybridge.h" #include "llinventoryclipboard.h" +#include "llinventoryfunctions.h" #include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "llmakeoutfitdialog.h" @@ -43,7 +46,6 @@ #include "llpanelmaininventory.h" #include "llpanelobjectinventory.h" #include "llpreview.h" // For LLMultiPreview -#include "llfoldervieweventlistener.h" #include "lltrans.h" #include "llvoavatarself.h" @@ -317,7 +319,7 @@ void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, std::string type, LLInventoryType::IT_GESTURE, PERM_ALL); } - else if ("outfit" == type) + else if ("outfit" == type || ("update outfit" == type && !LLAppearanceMgr::getInstance()->updateBaseOutfit())) // If updateBaseOutfit fails, prompt to make a new outfit { new LLMakeOutfitDialog(false); return; diff --git a/indra/newview/skins/default/xui/en-us/floater_customize.xml b/indra/newview/skins/default/xui/en-us/floater_customize.xml index eeb0e8bd4..e0f6df5b5 100644 --- a/indra/newview/skins/default/xui/en-us/floater_customize.xml +++ b/indra/newview/skins/default/xui/en-us/floater_customize.xml @@ -1449,4 +1449,5 @@ one from scratch and wear it. height="20" label="Make Outfit..." label_selected="Make Outfit..." mouse_opaque="true" name="Make Outfit" left="10" scale_image="true" width="100" /> +