diff options
-rwxr-xr-x | indra/newview/llmediactrl.cpp | 8 | ||||
-rwxr-xr-x | indra/newview/llviewerwindow.cpp | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 90d4dd093b..c4b68bb7e1 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -390,10 +390,12 @@ BOOL LLMediaCtrl::postBuild () LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar; registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this)); - // stinson 05/05/2014 : cannot assert on the menu container being NULL because it will be during the processing of main_view.xml - // llassert(LLMenuGL::sMenuContainer != NULL); + // stinson 05/05/2014 : use this as the parent of the context menu if the static menu + // container has yet to be created + LLPanel* menuParent = (LLMenuGL::sMenuContainer != NULL) ? dynamic_cast<LLPanel*>(LLMenuGL::sMenuContainer) : dynamic_cast<LLPanel*>(this); + llassert(menuParent != NULL); mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( - "menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + "menu_media_ctrl.xml", menuParent, LLViewerMenuHolderGL::child_registry_t::instance()); setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChanged, this, _2)); return TRUE; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 621baee0e6..2cb8e6a3ab 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1911,12 +1911,6 @@ void LLViewerWindow::initBase() gMenuHolder = getRootView()->getChild<LLViewerMenuHolderGL>("Menu Holder"); LLMenuGL::sMenuContainer = gMenuHolder; - - // stinson 05/05/2014 : the panel_progress.xml references a LLMediaCtrl(<web_browser></web_browser>) class - // which creates some menu items. However, because the Menu Holder is not initialized then, we need to - // update the parent for the menu items so they will be properly cleaned up. - LLMediaCtrl* mediaCtrl = getRootView()->findChild<LLMediaCtrl>("login_media_panel"); - mediaCtrl->updateContextMenuParent(LLMenuGL::sMenuContainer); } void LLViewerWindow::initWorldUI() |