summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rw-r--r--indra/newview/llfavoritesbar.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 347997a69a..7a887a2549 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -384,6 +384,8 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
mUpdateDropDownItems(true),
mRestoreOverflowMenu(false),
mGetPrevItems(true),
+ mMouseX(0),
+ mMouseY(0),
mItemsChangedTimer()
{
// Register callback for menus with current registrar (will be parent panel's registrar)
@@ -399,7 +401,7 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
//make chevron button
LLTextBox::Params more_button_params(p.more_button);
mMoreTextBox = LLUICtrlFactory::create<LLTextBox> (more_button_params);
- mMoreTextBox->setClickedCallback(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this));
+ mMoreTextBox->setClickedCallback(boost::bind(&LLFavoritesBarCtrl::onMoreTextBoxClicked, this));
addChild(mMoreTextBox);
mDropDownItemsCount = 0;
@@ -975,6 +977,12 @@ BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &it
return TRUE;
}
+void LLFavoritesBarCtrl::onMoreTextBoxClicked()
+{
+ LLUI::getInstance()->getMousePositionScreen(&mMouseX, &mMouseY);
+ showDropDownMenu();
+}
+
void LLFavoritesBarCtrl::showDropDownMenu()
{
if (mOverflowMenuHandle.isDead())
@@ -1130,7 +1138,7 @@ void LLFavoritesBarCtrl::positionAndShowMenu(LLToggleableMenu* menu)
}
}
- LLMenuGL::showPopup(this, menu, menu_x, menu_y);
+ LLMenuGL::showPopup(this, menu, menu_x, menu_y, mMouseX, mMouseY);
}
void LLFavoritesBarCtrl::onButtonClick(LLUUID item_id)