summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2023-03-09 16:22:50 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2023-03-09 16:22:50 +0200
commitfa50ce4b1054a453a97a81d64eb8099cae6f4cb5 (patch)
treeb28a6284b0dab415e0104ac6e132378a3101bf35
parent783a802abc63efd3b55d5b38c76c03d87d47bf75 (diff)
SL-19373 Show folder name in filter floater’s title bar in single-folder view
-rw-r--r--indra/newview/llpanelmaininventory.cpp25
1 files changed, 24 insertions, 1 deletions
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<LLTabContainer>("inventory filter tabs")->getCurrentPanel();
+ mActivePanel = mSingleFolderMode ? getChild<LLInventoryPanel>("single_folder_inv") : (LLInventoryPanel*)getChild<LLTabContainer>("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<LLInventoryPanel>("single_folder_inv") : (LLInventoryPanel*)getChild<LLTabContainer>("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