From fa50ce4b1054a453a97a81d64eb8099cae6f4cb5 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 9 Mar 2023 16:22:50 +0200 Subject: =?UTF-8?q?SL-19373=20Show=20folder=20name=20in=20filter=20floater?= =?UTF-8?q?=E2=80=99s=20title=20bar=20in=20single-folder=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llpanelmaininventory.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a3ac64aee8..ac188abb05 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -718,7 +718,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) void LLPanelMainInventory::onFilterSelected() { // Find my index - mActivePanel = (LLInventoryPanel*)getChild("inventory filter tabs")->getCurrentPanel(); + mActivePanel = mSingleFolderMode ? getChild("single_folder_inv") : (LLInventoryPanel*)getChild("inventory filter tabs")->getCurrentPanel(); if (!mActivePanel) { @@ -736,6 +736,14 @@ void LLPanelMainInventory::onFilterSelected() if (finder) { finder->changeFilter(&filter); + if (mSingleFolderMode) + { + const LLViewerInventoryCategory* cat = gInventory.getCategory(mSingleFolderPanelInventory->getSingleFolderRoot()); + if (cat) + { + finder->setTitle(cat->getName()); + } + } } if (filter.isActive()) { @@ -897,6 +905,15 @@ void LLPanelMainInventory::toggleFindOptions() parent_floater->addDependentFloater(mFinderHandle); // start background fetch of folders LLInventoryModelBackgroundFetch::instance().start(); + + if (mSingleFolderMode) + { + const LLViewerInventoryCategory* cat = gInventory.getCategory(mSingleFolderPanelInventory->getSingleFolderRoot()); + if (cat) + { + finder->setTitle(cat->getName()); + } + } } else { @@ -1323,6 +1340,7 @@ void LLPanelMainInventory::onViewModeClick() mActivePanel = mSingleFolderMode ? getChild("single_folder_inv") : (LLInventoryPanel*)getChild("inventory filter tabs")->getCurrentPanel(); updateTitle(); + onFilterSelected(); LLSidepanelInventory* sidepanel_inventory = getParentSidepanelInventory(); if (sidepanel_inventory) @@ -1795,6 +1813,11 @@ void LLPanelMainInventory::updateTitle() if (cat) { inventory_floater->setTitle(cat->getName()); + LLFloaterInventoryFinder *finder = getFinder(); + if (finder) + { + finder->setTitle(cat->getName()); + } } } else -- cgit v1.2.3