summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-01-17 21:40:49 -0800
committerMerov Linden <merov@lindenlab.com>2013-01-17 21:40:49 -0800
commitaabfce7d9f14ff18ea073708d79c6f62118b3453 (patch)
tree55933f0a9e5831f3f288f539702fdf48484c29e5 /indra/llui
parent90adfec715eb93663b424a2ac28a70e965247df4 (diff)
CHUI-682 : Fixed : Added LLMenuGL as a possible child of a toggle or contextual menu (for dynamic submenus).
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmenugl.cpp28
1 files changed, 21 insertions, 7 deletions
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<LLMenuGL*>(view))
+ LLMenuGL* menup = dynamic_cast<LLMenuGL*>(view);
+ if (menup)
{
- appendMenu(menup);
- return true;
+ return appendMenu(menup);
}
- else if (LLMenuItemGL* itemp = dynamic_cast<LLMenuItemGL*>(view))
+
+ LLMenuItemGL* itemp = dynamic_cast<LLMenuItemGL*>(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<LLContextMenu*>(view);
if (context)
+ {
return appendContextSubMenu(context);
+ }
LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view);
if (separator)
+ {
return append(separator);
+ }
LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view);
if (item)
+ {
return append(item);
-
+ }
+
+ LLMenuGL* menup = dynamic_cast<LLMenuGL*>(view);
+ if (menup)
+ {
+ return appendMenu(menup);
+ }
+
return false;
}