diff options
author | Merov Linden <merov@lindenlab.com> | 2014-06-17 09:50:48 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-06-17 09:50:48 -0700 |
commit | 9c792f03b4f006f5083c9fc98047bfad6bee8e16 (patch) | |
tree | 5e15865f837e4d7815000b79452f4bdd7245d511 /indra/newview/llmediactrl.cpp | |
parent | f79b1139fd28b29c51a0c001960ef3f0bb999ec0 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
Pull merge from lindenlab/viewer-release
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); +} |