diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llwearableitemslist.cpp | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_wearable_list_item.xml | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index da15b93697..b2aac75916 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -673,6 +673,8 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu setMenuItemEnabled(menu, "take_off_or_detach", n_worn == n_items); setMenuItemVisible(menu, "object_profile", !standalone); setMenuItemEnabled(menu, "object_profile", n_items == 1); + setMenuItemVisible(menu, "--no options--", FALSE); + setMenuItemEnabled(menu, "--no options--", FALSE); // Populate or hide the "Attach to..." / "Attach to HUD..." submenus. if (mask == MASK_ATTACHMENT && n_worn == 0) @@ -689,6 +691,20 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu { llwarns << "Non-wearable items passed." << llendl; } + + U32 num_visible_items = 0; + for (U32 menu_item_index = 0; menu_item_index < menu->getItemCount(); ++menu_item_index) + { + const LLMenuItemGL* menu_item = menu->getItem(menu_item_index); + if (menu_item && menu_item->getVisible()) + { + num_visible_items++; + } + } + if (num_visible_items == 0) + { + setMenuItemVisible(menu, "--no options--", TRUE); + } } void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu) diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml index efea2ae3e8..23eb89e448 100644 --- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml @@ -73,4 +73,10 @@ <on_click function="Wearable.CreateNew" /> </menu_item_call> + <menu_item_call + label="--no options--" + layout="topleft" + name="--no options--" + translate="false"> + </menu_item_call> </context_menu> |