summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2023-02-02 12:11:40 -0800
committerBrad Linden <brad@lindenlab.com>2023-02-02 12:11:40 -0800
commit5fabfa50d7135d29c0cb8a553006cf9038f9baae (patch)
tree1d0f21551bd443d4e1ba187480c082d612dfaac5 /indra/newview/llpanelmaininventory.cpp
parent627e3d51c61778e07e350689ce68ede24afe61ab (diff)
parent8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff)
Merge remote-tracking branch 'origin/main' into DRTVWR-559
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 8b78ee843f..f38357c5da 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -308,6 +308,13 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
gInventory.removeObserver(this);
delete mSavedFolderState;
+
+ auto menu = mMenuAddHandle.get();
+ if(menu)
+ {
+ menu->die();
+ mMenuAddHandle.markDead();
+ }
}
LLInventoryPanel* LLPanelMainInventory::getAllItemsPanel()
@@ -1187,13 +1194,12 @@ void LLPanelMainInventory::initListCommandsHandlers()
mEnableCallbackRegistrar.add("Inventory.GearDefault.Check", boost::bind(&LLPanelMainInventory::isActionChecked, this, _2));
mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2));
mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- mGearMenuButton->setMenu(mMenuGearDefault);
+ mGearMenuButton->setMenu(mMenuGearDefault, LLMenuButton::MP_TOP_LEFT, true);
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mMenuAddHandle = menu->getHandle();
mMenuVisibility = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_inventory_search_visibility.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- mVisibilityMenuButton->setMenu(mMenuVisibility);
- mVisibilityMenuButton->setMenuPosition(LLMenuButton::MP_BOTTOM_LEFT);
+ mVisibilityMenuButton->setMenu(mMenuVisibility, LLMenuButton::MP_BOTTOM_LEFT, true);
// Update the trash button when selected item(s) get worn or taken off.
LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLPanelMainInventory::updateListCommands, this));