Allow menu xmls from v3 that use context_menu tag instead of menu

Just parse them as LLMenuGL for now, that's what they basically are.
This commit is contained in:
Lirusaito
2019-01-20 09:32:13 -05:00
parent 1317f26d04
commit 61b1128d76

View File

@@ -412,13 +412,13 @@ LLMenuGL *LLUICtrlFactory::buildMenu(const std::string &filename, LLView* parent
}
// root must be called panel
if( !root->hasName( "menu_bar" ) && !root->hasName( "menu" ))
if( !root->hasName( "menu_bar" ) && !root->hasName( "menu" ) && !root->hasName("context_menu"))
{
LL_WARNS() << "Root node should be named menu bar or menu in : " << filename << LL_ENDL;
return NULL;
}
if (root->hasName("menu"))
if (root->hasName("menu") || root->hasName("context_menu"))
{
menu = (LLMenuGL*)LLMenuGL::fromXML(root, parentp, this);
}