summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorrichard <none@none>2009-11-09 16:14:52 -0800
committerrichard <none@none>2009-11-09 16:14:52 -0800
commit3b2d9f63e3a54660a8657ec573cce3f29f677047 (patch)
tree2f51c9bc9a04a639ff3ac6851917f4f4df89bd0b /indra/newview/llviewermenu.cpp
parentf4a7de3bb5a837df43525ac936000fd67177ea42 (diff)
parent2bc97bd68a774dd373c5688b5dc660abe90b37cc (diff)
merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 4d4ad1c022..c24efe9941 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -468,16 +468,6 @@ void set_underclothes_menu_options()
void init_menus()
{
S32 top = gViewerWindow->getRootView()->getRect().getHeight();
- S32 width = gViewerWindow->getRootView()->getRect().getWidth();
-
- //
- // Main menu bar
- //
- gMenuHolder = new LLViewerMenuHolderGL();
- gMenuHolder->setRect(LLRect(0, top, width, 0));
- gMenuHolder->setFollowsAll();
-
- LLMenuGL::sMenuContainer = gMenuHolder;
// Initialize actions
initialize_menus();
@@ -7083,6 +7073,11 @@ void handle_test_load_url(void*)
//
// LLViewerMenuHolderGL
//
+static LLDefaultChildRegistry::Register<LLViewerMenuHolderGL> r("menu_holder");
+
+LLViewerMenuHolderGL::LLViewerMenuHolderGL(const LLViewerMenuHolderGL::Params& p)
+: LLMenuHolderGL(p)
+{}
BOOL LLViewerMenuHolderGL::hideMenus()
{
@@ -7092,8 +7087,11 @@ BOOL LLViewerMenuHolderGL::hideMenus()
mParcelSelection = NULL;
mObjectSelection = NULL;
- gMenuBarView->clearHoverItem();
- gMenuBarView->resetMenuTrigger();
+ if (gMenuBarView)
+ {
+ gMenuBarView->clearHoverItem();
+ gMenuBarView->resetMenuTrigger();
+ }
return handled;
}