diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 6c2566813f040c741e1c48a935dd77323c30f1b5..075cfa054385ab194e37f25b9cfe001fd3b4b6c8 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -88,6 +88,8 @@ class LLOutfitListGearMenu registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); + registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this)); + enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitsList::isActionEnabled, mOutfitList, _2)); enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenu::onVisible, this, _2)); @@ -146,6 +148,16 @@ class LLOutfitListGearMenu } } + void onAdd() + { + const LLUUID& selected_id = getSelectedOutfitID(); + + if (selected_id.notNull()) + { + LLAppearanceMgr::getInstance()->addCategoryToCurrentOutfit(selected_id); + } + } + void onTakeOff() { // Take off selected items if there are any @@ -648,6 +660,17 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata) && LLAppearanceMgr::getInstance()->getBaseOutfitUUID() == mSelectedOutfitUUID ) || hasWornItemSelected(); } + + if (command_name == "wear_add") + { + if (gAgentWearables.isCOFChangeInProgress()) + { + return false; + } + + return LLAppearanceMgr::getCanAddToCOF(mSelectedOutfitUUID); + } + return false; } diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml index 8e7ef7f0b55f964384f301b54ee94bfe8a5b53ea..c4c7a5034aaa97a66296e991bf7c403b90094825 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -15,6 +15,16 @@ function="Gear.OnVisible" parameter="wear" /> </menu_item_call> + <menu_item_call + label="Wear - Add to Current Outfit" + layout="topleft" + name="wear_add"> + <on_click + function="Gear.WearAdd" /> + <on_enable + function="Gear.OnEnable" + parameter="wear_add" /> + </menu_item_call> <menu_item_call label="Take Off - Remove from Current Outfit" layout="topleft"