summaryrefslogtreecommitdiff
path: root/indra/llui/llmenugl.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-10-16 12:23:15 -0700
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-10-16 12:23:15 -0700
commita46d4ada3a2fe9ed8e5279e7d7e20d1ca485482c (patch)
tree3472c567b099034ee8ea13d34ccf89b41a6daccf /indra/llui/llmenugl.cpp
parent0ca59987843cfcaedb12592b9466567ef421c4e8 (diff)
parent5a22949cf509ebd1a3c7dfbd029b4bc188fee4a3 (diff)
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r--indra/llui/llmenugl.cpp12
1 files changed, 11 insertions, 1 deletions
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;
}