Skip to content
Snippets Groups Projects
Commit 3adf8935 authored by Vadim ProductEngine's avatar Vadim ProductEngine
Browse files

CHU-78 WIP Subtle cleanup.

parent 59089017
No related branches found
No related tags found
No related merge requests found
...@@ -74,8 +74,6 @@ boost::signals2::connection LLMenuButton::setMouseDownCallback( const mouse_sign ...@@ -74,8 +74,6 @@ boost::signals2::connection LLMenuButton::setMouseDownCallback( const mouse_sign
void LLMenuButton::hideMenu() void LLMenuButton::hideMenu()
{ {
if(mMenuHandle.isDead()) return;
LLToggleableMenu* menu = getMenu(); LLToggleableMenu* menu = getMenu();
if (menu) if (menu)
{ {
...@@ -120,7 +118,7 @@ void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_T ...@@ -120,7 +118,7 @@ void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_T
BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask ) 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)) if( KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key))
{ {
...@@ -158,8 +156,6 @@ void LLMenuButton::toggleMenu() ...@@ -158,8 +156,6 @@ void LLMenuButton::toggleMenu()
return; return;
} }
if(mMenuHandle.isDead()) return;
LLToggleableMenu* menu = getMenu(); LLToggleableMenu* menu = getMenu();
if (!menu) return; if (!menu) return;
...@@ -189,7 +185,8 @@ void LLMenuButton::toggleMenu() ...@@ -189,7 +185,8 @@ void LLMenuButton::toggleMenu()
void LLMenuButton::updateMenuOrigin() void LLMenuButton::updateMenuOrigin()
{ {
if (mMenuHandle.isDead()) return; LLToggleableMenu* menu = getMenu();
if (!menu) return;
LLRect rect = getRect(); LLRect rect = getRect();
...@@ -198,12 +195,12 @@ void LLMenuButton::updateMenuOrigin() ...@@ -198,12 +195,12 @@ void LLMenuButton::updateMenuOrigin()
case MP_TOP_LEFT: case MP_TOP_LEFT:
{ {
mX = rect.mLeft; mX = rect.mLeft;
mY = rect.mTop + mMenuHandle.get()->getRect().getHeight(); mY = rect.mTop + menu->getRect().getHeight();
break; break;
} }
case MP_TOP_RIGHT: case MP_TOP_RIGHT:
{ {
const LLRect& menu_rect = mMenuHandle.get()->getRect(); const LLRect& menu_rect = menu->getRect();
mX = rect.mRight - menu_rect.getWidth(); mX = rect.mRight - menu_rect.getWidth();
mY = rect.mTop + menu_rect.getHeight(); mY = rect.mTop + menu_rect.getHeight();
break; break;
......
...@@ -4021,11 +4021,6 @@ BOOL LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask ) ...@@ -4021,11 +4021,6 @@ BOOL LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask )
return result; return result;
} }
void LLContextMenu::draw()
{
LLMenuGL::draw();
}
BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu) BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu)
{ {
......
...@@ -668,8 +668,6 @@ class LLContextMenu ...@@ -668,8 +668,6 @@ class LLContextMenu
// can't set visibility directly, must call show or hide // can't set visibility directly, must call show or hide
virtual void setVisible (BOOL visible); virtual void setVisible (BOOL visible);
virtual void draw ();
virtual void show (S32 x, S32 y); virtual void show (S32 x, S32 y);
virtual void hide (); virtual void hide ();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment