diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index cb1be5fabc..976d89a5b7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -415,7 +415,7 @@ public: static LLMenuParcelObserver* gMenuParcelObserver = NULL; -static LLUIListener sUIListener("UI"); +static LLUIListener sUIListener; LLMenuParcelObserver::LLMenuParcelObserver() { @@ -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(); @@ -3807,7 +3797,7 @@ class LLViewDefaultUISize : public view_listener_t { gSavedSettings.setF32("UIScaleFactor", 1.0f); gSavedSettings.setBOOL("UIAutoScale", FALSE); - gViewerWindow->reshape(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight()); + gViewerWindow->reshape(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); return true; } }; @@ -7078,6 +7068,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() { @@ -7087,8 +7082,11 @@ BOOL LLViewerMenuHolderGL::hideMenus() mParcelSelection = NULL; mObjectSelection = NULL; - gMenuBarView->clearHoverItem(); - gMenuBarView->resetMenuTrigger(); + if (gMenuBarView) + { + gMenuBarView->clearHoverItem(); + gMenuBarView->resetMenuTrigger(); + } return handled; } |