diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-14 10:25:02 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-14 10:25:02 -0800 |
commit | ed06c4b8b937b42882ee1740def365d476bef10e (patch) | |
tree | c497ba83da3a69c1b3e57de087bfbdd0d3bb08a9 /indra/llui/lltoggleablemenu.cpp | |
parent | a39bda1b775a161558f75bd0a23575b8ef78a80e (diff) | |
parent | 93c1e1bd6eaa8f77e746b1346b1729ed564081b4 (diff) |
merge from product-engine
Diffstat (limited to 'indra/llui/lltoggleablemenu.cpp')
-rw-r--r-- | indra/llui/lltoggleablemenu.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp index 717e135412..5df1d35383 100644 --- a/indra/llui/lltoggleablemenu.cpp +++ b/indra/llui/lltoggleablemenu.cpp @@ -40,6 +40,7 @@ static LLDefaultChildRegistry::Register<LLToggleableMenu> r("toggleable_menu"); LLToggleableMenu::LLToggleableMenu(const LLToggleableMenu::Params& p) : LLMenuGL(p), + mButtonRect(), mClosedByButtonClick(false) { } @@ -56,13 +57,19 @@ void LLToggleableMenu::handleVisibilityChange (BOOL curVisibilityIn) } } -void LLToggleableMenu::setButtonRect(const LLRect& rect, LLView* current_view) +void LLToggleableMenu::setButtonRect(const LLRect& rect, LLView* current_view) { LLRect screen; current_view->localRectToScreen(rect, &screen); mButtonRect = screen; } +void LLToggleableMenu::setButtonRect(LLView* current_view) +{ + LLRect rect = current_view->getLocalRect(); + setButtonRect(rect, current_view); +} + bool LLToggleableMenu::toggleVisibility() { if (mClosedByButtonClick) |