Skip to content
Snippets Groups Projects
Commit a8f40db0 authored by Loren Shih's avatar Loren Shih
Browse files

EXT-8751 FIXED "Create new" in Edit Outfit doesn't actually check if you can...

EXT-8751 FIXED "Create new" in Edit Outfit doesn't actually check if you can legally create a new item

Create New now makes sure you haven't exceeded max wearables.
Also took out debug camera hack.
parent 8c950273
No related branches found
No related tags found
No related merge requests found
......@@ -889,6 +889,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
setMenuItemVisible(menu, "edit", !standalone && mask & (MASK_CLOTHING|MASK_BODYPART) && n_worn == n_items && n_worn == 1);
setMenuItemEnabled(menu, "edit", n_editable == 1 && n_worn == 1 && n_items == 1);
setMenuItemVisible(menu, "create_new", mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1);
setMenuItemEnabled(menu, "create_new", canAddWearable(ids.front()));
setMenuItemVisible(menu, "show_original", !standalone);
setMenuItemEnabled(menu, "show_original", n_items == 1 && n_links == n_items);
setMenuItemVisible(menu, "take_off", mask == MASK_CLOTHING && n_worn == n_items);
......@@ -1039,6 +1040,10 @@ bool LLWearableItemsList::ContextMenu::canAddWearables(const uuid_vec_t& item_id
U32 n_clothes = m_it->second;
U32 wearable_count = gAgentWearables.getWearableCount(w_type);
if ((wearable_count > 0) && !LLWearableType::getAllowMultiwear(w_type))
{
return false;
}
if ((wearable_count + n_clothes) > LLAgentWearables::MAX_CLOTHING_PER_TYPE)
{
return false;
......
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