diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-08-18 17:35:13 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-08-18 18:36:33 -0400 |
commit | 048ebff444a154b103bdab161df17aaca2d18cd8 (patch) | |
tree | 489a144cfcdb9ec850a3731fb3214fc82943b851 /indra | |
parent | ab4abd4387cb834e0c350bfe78e929e8530f4f80 (diff) |
Fix findChild frame drops when switching inventory panels
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 28 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 1 |
2 files changed, 11 insertions, 18 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 1a2c84af73..8334da1836 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -308,31 +308,29 @@ LLPanelMainInventory::~LLPanelMainInventory( void ) // for example, LLParamSDParser doesn't know about U64, // so some FilterOps params should be revised. LLSD filterRoot; - LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>(ALL_ITEMS); - if (all_items_panel) + if (mAllItemsPanel) { LLSD filterState; LLInventoryPanel::InventoryState p; - all_items_panel->getFilter().toParams(p.filter); - all_items_panel->getRootViewModel().getSorter().toParams(p.sort); + mAllItemsPanel->getFilter().toParams(p.filter); + mAllItemsPanel->getRootViewModel().getSorter().toParams(p.sort); if (p.validateBlock(false)) { LLParamSDParser().writeSD(filterState, p); - filterRoot[all_items_panel->getName()] = filterState; + filterRoot[mAllItemsPanel->getName()] = filterState; } } - LLInventoryPanel* panel = findChild<LLInventoryPanel>(RECENT_ITEMS); - if (panel) + if (mRecentPanel) { LLSD filterState; LLInventoryPanel::InventoryState p; - panel->getFilter().toParams(p.filter); - panel->getRootViewModel().getSorter().toParams(p.sort); + mRecentPanel->getFilter().toParams(p.filter); + mRecentPanel->getRootViewModel().getSorter().toParams(p.sort); if (p.validateBlock(false)) { LLParamSDParser().writeSD(filterState, p); - filterRoot[panel->getName()] = filterState; + filterRoot[mRecentPanel->getName()] = filterState; } } @@ -1525,17 +1523,13 @@ void LLPanelMainInventory::onAddButtonClick() void LLPanelMainInventory::setActivePanel() { // Todo: should cover gallery mode in some way - if(mSingleFolderMode && isListViewMode()) - { - mActivePanel = getChild<LLInventoryPanel>("comb_single_folder_inv"); - } - else if(mSingleFolderMode && isCombinationViewMode()) + if(mSingleFolderMode && (isListViewMode() || isCombinationViewMode())) { - mActivePanel = getChild<LLInventoryPanel>("comb_single_folder_inv"); + mActivePanel = mCombinationInventoryPanel; } else { - mActivePanel = (LLInventoryPanel*)getChild<LLTabContainer>("inventory filter tabs")->getCurrentPanel(); + mActivePanel = (LLInventoryPanel*)mFilterTabs->getCurrentPanel(); } mViewModeBtn->setEnabled(mSingleFolderMode || (getAllItemsPanel() == getActivePanel())); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 529d6f97ca..97d5781566 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -10125,7 +10125,6 @@ void initialize_menus() commit.add("Object.Buy", boost::bind(&handle_buy)); commit.add("Object.Edit", boost::bind(&handle_object_edit)); - commit.add("Object.Edit", boost::bind(&handle_object_edit)); commit.add("Object.EditGLTFMaterial", boost::bind(&handle_object_edit_gltf_material)); commit.add("Object.Inspect", boost::bind(&handle_object_inspect)); commit.add("Object.Open", boost::bind(&handle_object_open)); |