summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-04-08 09:21:55 -0400
committerOz Linden <oz@lindenlab.com>2011-04-08 09:21:55 -0400
commitc492bffaa6cd0d9bb05bbc3671c7658b7ba52862 (patch)
tree9bf24f8e6ae1207aef0cae78ae62f5509e5074e6 /indra/newview/llwearableitemslist.cpp
parent3ffc5dc09c186fe0ac57ac66b33bfc105ca01363 (diff)
parent52615d251bc9261fe5765feefbcd31021bd75934 (diff)
pull tags back from viewer-release
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r--indra/newview/llwearableitemslist.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 66a6ab5e94..92697fb2eb 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -446,6 +446,7 @@ clothing_to_string_map_t init_clothing_string_map()
w_map.insert(std::make_pair(LLWearableType::WT_SKIRT, "skirt_not_worn"));
w_map.insert(std::make_pair(LLWearableType::WT_ALPHA, "alpha_not_worn"));
w_map.insert(std::make_pair(LLWearableType::WT_TATTOO, "tattoo_not_worn"));
+ w_map.insert(std::make_pair(LLWearableType::WT_PHYSICS, "physics_not_worn"));
return w_map;
}
@@ -891,6 +892,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", canAddWearables(ids));
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);
@@ -1041,6 +1043,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;