summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authormberezhnoy <mberezhnoy@productengine.com>2013-04-08 22:05:59 +0300
committermberezhnoy <mberezhnoy@productengine.com>2013-04-08 22:05:59 +0300
commit52b9b52ff70c9dcd602d1c96c5d0429f90208a20 (patch)
tree55573d3c44c431a2a174fd25e048358a8cc55473 /indra/llui
parent776d63b128bebb7dd5cd8f25a2d7352b69d2deec (diff)
CHUI-748 (Right click does not produce context menu for landmarks in Trash in Places Floater)
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmenugl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index f7bf39c897..f854e1785d 100644
--- 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();