summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-01-18 03:42:24 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-01-18 03:42:24 +0200
commit7f883354888b3fb39f19cad7809bd3efea9b457c (patch)
tree99b85d6babcaa73b60423dabf1b1c6af240d07ab /indra/newview/llinventorymodel.cpp
parenta0c3d69c620a92d73a1008f218680fb4d0ef9255 (diff)
parent6850b915fe42f5a75fc9d8bb9ca05f961de3244a (diff)
Merge remote-tracking branch 'KittyBarnett/texture-preview' into DRTVWR-579-texture-preview
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 6ba04cdff2..cbcdf2efb0 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -451,6 +451,31 @@ void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id,
items = get_ptr_in_map(mParentChildItemTree, cat_id);
}
+void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id, cat_array_t& categories, item_array_t& items, LLInventoryCollectFunctor& f) const
+{
+ if (cat_array_t* categoriesp = get_ptr_in_map(mParentChildCategoryTree, cat_id))
+ {
+ for (LLViewerInventoryCategory* pFolder : *categoriesp)
+ {
+ if (f(pFolder, nullptr))
+ {
+ categories.push_back(pFolder);
+ }
+ }
+ }
+
+ if (item_array_t* itemsp = get_ptr_in_map(mParentChildItemTree, cat_id))
+ {
+ for (LLViewerInventoryItem* pItem : *itemsp)
+ {
+ if (f(nullptr, pItem))
+ {
+ items.push_back(pItem);
+ }
+ }
+ }
+}
+
LLMD5 LLInventoryModel::hashDirectDescendentNames(const LLUUID& cat_id) const
{
LLInventoryModel::cat_array_t* cat_array;