summaryrefslogtreecommitdiff
path: root/indra/llui/llmenugl.cpp
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-05-17 09:53:56 +0300
committerAlexei Arabadji <aarabadji@productengine.com>2010-05-17 09:53:56 +0300
commit8bd31fa35190bdd99a4167a2bfdd7d3d1a6e5d3f (patch)
tree247ef8a449dd800b36d35d88b25e4f89758faacf /indra/llui/llmenugl.cpp
parente462c90db6063ee67b95ea376c65089dd0061f6d (diff)
EXT-7085 FIXED Added check to avoid showing invisible menu items.
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/388/ --HG-- branch : product-engine
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r--indra/llui/llmenugl.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index e0e86ae228..779779c7bc 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3726,10 +3726,14 @@ void LLContextMenuBranch::buildDrawLabel( void )
void LLContextMenuBranch::showSubMenu()
{
- S32 center_x;
- S32 center_y;
- localPointToScreen(getRect().getWidth(), getRect().getHeight() , &center_x, &center_y);
- mBranch->show( center_x, center_y);
+ LLMenuItemGL* menu_item = mBranch->getParentMenuItem();
+ if (menu_item != NULL && menu_item->getVisible())
+ {
+ S32 center_x;
+ S32 center_y;
+ localPointToScreen(getRect().getWidth(), getRect().getHeight() , &center_x, &center_y);
+ mBranch->show(center_x, center_y);
+ }
}
// onCommit() - do the primary funcationality of the menu item.