From aabfce7d9f14ff18ea073708d79c6f62118b3453 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 17 Jan 2013 21:40:49 -0800 Subject: CHUI-682 : Fixed : Added LLMenuGL as a possible child of a toggle or contextual menu (for dynamic submenus). --- indra/llui/llmenugl.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'indra/llui/llmenugl.cpp') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 93dc13475b..7dcc39950b 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1751,16 +1751,18 @@ void LLMenuGL::setCanTearOff(BOOL tear_off) bool LLMenuGL::addChild(LLView* view, S32 tab_group) { - if (LLMenuGL* menup = dynamic_cast(view)) + LLMenuGL* menup = dynamic_cast(view); + if (menup) { - appendMenu(menup); - return true; + return appendMenu(menup); } - else if (LLMenuItemGL* itemp = dynamic_cast(view)) + + LLMenuItemGL* itemp = dynamic_cast(view); + if (itemp) { - append(itemp); - return true; + return append(itemp); } + return false; } @@ -1771,16 +1773,28 @@ bool LLMenuGL::addContextChild(LLView* view, S32 tab_group) { LLContextMenu* context = dynamic_cast(view); if (context) + { return appendContextSubMenu(context); + } LLMenuItemSeparatorGL* separator = dynamic_cast(view); if (separator) + { return append(separator); + } LLMenuItemGL* item = dynamic_cast(view); if (item) + { return append(item); - + } + + LLMenuGL* menup = dynamic_cast(view); + if (menup) + { + return appendMenu(menup); + } + return false; } -- cgit v1.2.3