diff options
author | Oz Linden <oz@lindenlab.com> | 2013-08-26 15:14:12 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-08-26 15:14:12 -0400 |
commit | 7ca10e516126e5fa9b076c04957b491495513907 (patch) | |
tree | 690323c7379c8151b1d7e251fa2878c10603fd61 /indra/llui/llmenugl.cpp | |
parent | 1e2a6ee3f440b7d076dc97f3a0628c90195f5386 (diff) | |
parent | 6e1138585bf745f73f0bb99ca62f77eeb273f1e4 (diff) |
merge changes for 3.6.4-release
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rwxr-xr-x | indra/llui/llmenugl.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index f7bf39c897..f854e1785d 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3146,6 +3146,13 @@ 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()) + { + return; + } + + menu->setVisible( TRUE ); + //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(); @@ -3156,8 +3163,9 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) item_enabled = item_enabled || menu_item->getEnabled(); } - if(menu->getChildList()->empty() || !item_enabled) + if(!item_enabled) { + menu->setVisible( FALSE ); return; } @@ -3173,8 +3181,6 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) menu->mFirstVisibleItem = NULL; } - menu->setVisible( TRUE ); - // Fix menu rect if needed. menu->needsArrange(); menu->arrangeAndClear(); |