Issue 773: Add option to update currently worn outfit

This commit is contained in:
Lirusaito
2013-05-08 00:47:55 -04:00
parent 29c2bc2bed
commit f48eca366a
4 changed files with 10 additions and 3 deletions

View File

@@ -189,6 +189,7 @@ LLFloaterCustomize::~LLFloaterCustomize()
BOOL LLFloaterCustomize::postBuild()
{
getChild<LLUICtrl>("Make Outfit")->setCommitCallback(boost::bind(&LLFloaterCustomize::onBtnMakeOutfit, this));
getChild<LLUICtrl>("Save Outfit")->setCommitCallback(boost::bind(&LLAppearanceMgr::updateBaseOutfit, LLAppearanceMgr::getInstance()));
getChild<LLUICtrl>("Ok")->setCommitCallback(boost::bind(&LLFloaterCustomize::onBtnOk, this));
getChild<LLUICtrl>("Cancel")->setCommitCallback(boost::bind(&LLFloater::onClickClose, this));

View File

@@ -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;

View File

@@ -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" />
<button bottom="-536" follows="left|bottom" height="20" left="110" width="100" name="Save Outfit" label="Save Outfit"/>
</floater>

View File

@@ -72,6 +72,9 @@
name="Open" width="128">
<on_click filter="" function="Inventory.DoToSelected" userdata="open" />
</menu_item_call>
<menu_item_call label="Update Outfit" mouse_opaque="true" name="Update Outfit">
<on_click filter="" function="Inventory.DoCreate" userdata="update outfit"/>
</menu_item_call>
<menu_item_separator bottom_delta="-8" height="8" left="0" mouse_opaque="true" name="separator"
width="128" />
<menu_item_call bottom_delta="-18" height="18" label="New Window" left="0" mouse_opaque="true"