diff options
author | simon <none@none> | 2013-08-26 15:45:09 -0700 |
---|---|---|
committer | simon <none@none> | 2013-08-26 15:45:09 -0700 |
commit | 90d1c5b3676fe4e8ea8668b41fdf92613d5f102d (patch) | |
tree | 8d5afd9678fd44444bcc7b5d311b5cfb7abe5217 /indra/llui/llmenugl.cpp | |
parent | ac2dc34ed0abbac8d5a8eb7f887037fe387c6a7a (diff) | |
parent | 27d637d0f14fdfff496256222dc1343d2d7ee9ae (diff) |
Merge downstream code for CHUIStorm
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(); |