diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-04-14 22:28:49 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-04-14 22:28:49 +0300 |
commit | 3adf89351359210f6f8a0f33cef94733a815dea1 (patch) | |
tree | 851bb55736a160f9892831bdf397cdf7811df96b /indra | |
parent | 590890173216570ca834ba1ead66db1a25952247 (diff) |
CHU-78 WIP Subtle cleanup.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llmenubutton.cpp | 13 | ||||
-rw-r--r-- | indra/llui/llmenugl.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llmenugl.h | 2 |
3 files changed, 5 insertions, 15 deletions
diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index 320f62d5c1..746ade4648 100644 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -74,8 +74,6 @@ boost::signals2::connection LLMenuButton::setMouseDownCallback( const mouse_sign void LLMenuButton::hideMenu() { - if(mMenuHandle.isDead()) return; - LLToggleableMenu* menu = getMenu(); if (menu) { @@ -120,7 +118,7 @@ void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_T BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask ) { - if (mMenuHandle.isDead()) return FALSE; + if (!getMenu()) return FALSE; if( KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key)) { @@ -158,8 +156,6 @@ void LLMenuButton::toggleMenu() return; } - if(mMenuHandle.isDead()) return; - LLToggleableMenu* menu = getMenu(); if (!menu) return; @@ -189,7 +185,8 @@ void LLMenuButton::toggleMenu() void LLMenuButton::updateMenuOrigin() { - if (mMenuHandle.isDead()) return; + LLToggleableMenu* menu = getMenu(); + if (!menu) return; LLRect rect = getRect(); @@ -198,12 +195,12 @@ void LLMenuButton::updateMenuOrigin() case MP_TOP_LEFT: { mX = rect.mLeft; - mY = rect.mTop + mMenuHandle.get()->getRect().getHeight(); + mY = rect.mTop + menu->getRect().getHeight(); break; } case MP_TOP_RIGHT: { - const LLRect& menu_rect = mMenuHandle.get()->getRect(); + const LLRect& menu_rect = menu->getRect(); mX = rect.mRight - menu_rect.getWidth(); mY = rect.mTop + menu_rect.getHeight(); break; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 95ecbb1c94..62b695fedb 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -4021,11 +4021,6 @@ BOOL LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask ) return result; } -void LLContextMenu::draw() -{ - LLMenuGL::draw(); -} - BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu) { diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 36f3ba34b9..c6ee5434b0 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -668,8 +668,6 @@ public: // can't set visibility directly, must call show or hide virtual void setVisible (BOOL visible); - virtual void draw (); - virtual void show (S32 x, S32 y); virtual void hide (); |