summaryrefslogtreecommitdiff
path: root/indra/llui/llmenubutton.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2010-10-14 14:07:57 -0400
committerOz Linden <oz@lindenlab.com>2010-10-14 14:07:57 -0400
commita63b83775120f7ebe3bafb897da70e4e41bda6a4 (patch)
tree9bf6087af7b9b6174ef0498f9dbc46c38f0f7ecc /indra/llui/llmenubutton.cpp
parentc322a29752c74c92328ebffeef77faa06e9ca7d9 (diff)
parent1bd19e8ffe99c4a2d0df8936bf01a63ebc05258f (diff)
pull late fixes from beta
Diffstat (limited to 'indra/llui/llmenubutton.cpp')
-rw-r--r--indra/llui/llmenubutton.cpp32
1 files changed, 3 insertions, 29 deletions
diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp
index 0930eb95dd..3df05f4d3f 100644
--- a/indra/llui/llmenubutton.cpp
+++ b/indra/llui/llmenubutton.cpp
@@ -57,8 +57,6 @@ LLMenuButton::LLMenuButton(const LLMenuButton::Params& p)
llwarns << "Error loading menu_button menu" << llendl;
}
}
-
- setMenuPosition();
}
void LLMenuButton::toggleMenu()
@@ -72,34 +70,12 @@ void LLMenuButton::toggleMenu()
}
else
{
- //mMenu->needsArrange(); //so it recalculates the visible elements
- LLMenuGL::showPopup(getParent(), mMenu, mX, mY);
+ LLRect rect = getRect();
+ //mMenu->needsArrange(); //so it recalculates the visible elements
+ LLMenuGL::showPopup(getParent(), mMenu, rect.mLeft, rect.mBottom);
}
}
-void LLMenuButton::setMenuPosition(EMenuPosition position /*ON_BOTTOM_LEFT*/)
-{
- if (!mMenu)
- return;
-
- LLRect rect = getRect();
-
- switch (position)
- {
- case ON_TOP_LEFT:
- {
- mX = rect.mLeft;
- mY = rect.mTop + mMenu->getRect().getHeight();
- break;
- }
- case ON_BOTTOM_LEFT:
- {
- mX = rect.mLeft;
- mY = rect.mBottom;
- break;
- }
- }
-}
void LLMenuButton::hideMenu()
{
@@ -133,8 +109,6 @@ BOOL LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask)
setFocus(TRUE);
}
- LLUICtrl::handleMouseDown(x, y, mask);
-
toggleMenu();
if (getSoundFlags() & MOUSE_DOWN)