summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2021-04-29 13:45:15 -0700
committerCallum Prentice <callum@lindenlab.com>2021-04-29 13:45:15 -0700
commit99b99a1b4a21758ef888b251d8f8bbf565f8b42e (patch)
tree5c91eaa4a6dffd724cdb0cb8f4de8c11f82335a5 /indra/newview/llfavoritesbar.cpp
parent0df59ff9e6e50237d36a976731e81c6e37e73933 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Clean up a merge conflict
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)