From 5a22949cf509ebd1a3c7dfbd029b4bc188fee4a3 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 16 Oct 2012 15:33:12 +0300 Subject: CHUI-388 FIXED Do not add menu items to Participant Menu if own avatar is selected in participant list. Do not show Menu if all menu items are disabled. --- indra/llui/llmenugl.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/llui/llmenugl.cpp') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 5182a8cea1..ae4aa1e1dd 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3037,7 +3037,17 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) const S32 CURSOR_HEIGHT = 22; // Approximate "normal" cursor size const S32 CURSOR_WIDTH = 12; - if(menu->getChildList()->empty()) + //Do not show menu if all menu items are disabled + BOOL item_enabled = false; + for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin(); + itor != menu->getChildList()->end(); + ++itor) + { + LLView *menu_item = (*itor); + item_enabled = item_enabled || menu_item->getEnabled(); + } + + if(menu->getChildList()->empty() || !item_enabled) { return; } -- cgit v1.2.3