diff options
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.h | 5 |
2 files changed, 17 insertions, 18 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index fd7085c452..1a2c84af73 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -239,6 +239,11 @@ bool LLPanelMainInventory::postBuild() } } + mParentSidepanel = getParentSidepanelInventory(); + if (mParentSidepanel) + { + mInboxPanel = mParentSidepanel->getChild<LLPanelMarketplaceInbox>("marketplace_inbox"); + } mFilterEditor = getChild<LLFilterEditor>("inventory search editor"); if (mFilterEditor) @@ -761,14 +766,9 @@ void LLPanelMainInventory::onClearSearch() } mFilterSubString = ""; - LLSidepanelInventory * sidepanel_inventory = getParentSidepanelInventory(); - if (sidepanel_inventory) + if (mInboxPanel) { - LLPanelMarketplaceInbox* inbox_panel = sidepanel_inventory->getChild<LLPanelMarketplaceInbox>("marketplace_inbox"); - if (inbox_panel) - { - inbox_panel->onClearSearch(); - } + mInboxPanel->onClearSearch(); } } @@ -818,14 +818,9 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) // set new filter string setFilterSubString(mFilterSubString); - LLSidepanelInventory * sidepanel_inventory = getParentSidepanelInventory(); - if (sidepanel_inventory) + if (mInboxPanel) { - LLPanelMarketplaceInbox* inbox_panel = sidepanel_inventory->getChild<LLPanelMarketplaceInbox>("marketplace_inbox"); - if (inbox_panel) - { - inbox_panel->onFilterEdit(search_string); - } + mInboxPanel->onFilterEdit(search_string); } } @@ -1578,16 +1573,15 @@ void LLPanelMainInventory::toggleViewMode() updateTitle(); onFilterSelected(); - LLSidepanelInventory* sidepanel_inventory = getParentSidepanelInventory(); - if (sidepanel_inventory) + if (mParentSidepanel) { if(mSingleFolderMode) { - sidepanel_inventory->hideInbox(); + mParentSidepanel->hideInbox(); } else { - sidepanel_inventory->toggleInbox(); + mParentSidepanel->toggleInbox(); } } } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 68ac3410d8..c1c7e9a7ab 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -49,6 +49,8 @@ class LLSidepanelInventory; class LLToggleableMenu; class LLFloater; class LLFloaterSidePanelContainer; +class LLSidepanelInventory; +class LLPanelMarketplaceInbox; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLPanelMainInventory @@ -244,6 +246,9 @@ protected: void setUploadCostIfNeeded(); void disableAddIfNeeded(); private: + LLSidepanelInventory* mParentSidepanel = nullptr; + LLPanelMarketplaceInbox* mInboxPanel = nullptr; + LLToggleableMenu* mMenuGearDefault; LLToggleableMenu* mMenuViewDefault; LLToggleableMenu* mMenuVisibility; |