Skip to content
Snippets Groups Projects
Commit 92b104f4 authored by Nyx (Neal Orman)'s avatar Nyx (Neal Orman)
Browse files

VWR-19699 Correct "wear" and "add" behavior

added "add" menu item to clothing right-click menus and corrected
"wear" to mean "replace top wearable of this type"

reviewed by Richard
parent fa5ad666
No related branches found
No related tags found
No related merge requests found
...@@ -508,11 +508,13 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu() ...@@ -508,11 +508,13 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu()
const uuid_vec_t& ids = mUUIDs; // selected items IDs const uuid_vec_t& ids = mUUIDs; // selected items IDs
LLUUID selected_id = ids.front(); // ID of the first selected item LLUUID selected_id = ids.front(); // ID of the first selected item
functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false); functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, true);
functor_t add = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false);
functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1);
// Register handlers common for all wearable types. // Register handlers common for all wearable types.
registrar.add("Wearable.Wear", boost::bind(handleMultiple, wear, ids)); registrar.add("Wearable.Wear", boost::bind(handleMultiple, wear, ids));
registrar.add("Wearable.Add", boost::bind(handleMultiple, add, ids));
registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids)); registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids));
registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id)); registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id));
registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id)); registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id));
......
...@@ -8,6 +8,13 @@ ...@@ -8,6 +8,13 @@
<on_click <on_click
function="Wearable.Wear" /> function="Wearable.Wear" />
</menu_item_call> </menu_item_call>
<menu_item_call
label="Add"
layout="topleft"
name="wear_add">
<on_click
function="Wearable.Add" />
</menu_item_call>
<menu_item_call <menu_item_call
label="Take Off / Detach" label="Take Off / Detach"
layout="topleft" layout="topleft"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment