summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:05:19 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:05:19 +0300
commit789be6b93351e6150e5c2167a1ae3a64eed0717c (patch)
treea302168e5b155cfb54ad70d4bfb55c9c4dcd008e /indra/newview/llfavoritesbar.cpp
parent487685fef1ad4afdb1d6692a4ab6b2980205abd7 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge branch 'master' into DRTVWR-520-apple-notarization
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)