diff options
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r-- | indra/newview/llpanelplaces.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index f0e60386b6..c524fd7059 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -39,6 +39,7 @@ #include "llfiltereditor.h" #include "llfirstuse.h" #include "llfloaterreg.h" +#include "llmenubutton.h" #include "llnotificationsutil.h" #include "lltabcontainer.h" #include "lltexteditor.h" @@ -282,8 +283,8 @@ BOOL LLPanelPlaces::postBuild() mCloseBtn = getChild<LLButton>("close_btn"); mCloseBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); - mOverflowBtn = getChild<LLButton>("overflow_btn"); - mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this)); + mOverflowBtn = getChild<LLMenuButton>("overflow_btn"); + mOverflowBtn->setMouseDownCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this)); mPlaceInfoBtn = getChild<LLButton>("profile_btn"); mPlaceInfoBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onProfileButtonClicked, this)); @@ -783,16 +784,7 @@ void LLPanelPlaces::onOverflowButtonClicked() return; } - if (!menu->toggleVisibility()) - return; - - if (menu->getButtonRect().isEmpty()) - { - menu->setButtonRect(mOverflowBtn); - } - menu->updateParent(LLMenuGL::sMenuContainer); - LLRect rect = mOverflowBtn->getRect(); - LLMenuGL::showPopup(this, menu, rect.mRight, rect.mTop); + mOverflowBtn->setMenu(menu, LLMenuButton::MP_TOP_RIGHT); } void LLPanelPlaces::onProfileButtonClicked() |