diff options
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rwxr-xr-x | indra/newview/llmediactrl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index f406bb9f06..0178512cb5 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -391,8 +391,12 @@ BOOL LLMediaCtrl::postBuild () LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar; registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this)); + // 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; @@ -1118,3 +1122,8 @@ void LLMediaCtrl::setTrustedContent(bool trusted) mMediaSource->setTrustedBrowser(trusted); } } + +void LLMediaCtrl::updateContextMenuParent(LLView* pNewParent) +{ + mContextMenu->updateParent(pNewParent); +} |