summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-10 03:50:44 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-10 03:50:44 +0300
commit0acee937f55e6d1a198be2549d5cb55a0403dd4d (patch)
tree2deaa98bcd99fd2860da758a92816c3bdb838acd /indra/newview/llinventoryfunctions.cpp
parenta902138de15067a86a6aeb02fdabd094873da0b2 (diff)
parentda9a1dcb55548a249ff7a1255f3e518696b81245 (diff)
Merge branch 'main' into marchcat/c-merge
# Conflicts: # indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 207dd692a8..7ddc0c18b2 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2151,6 +2151,24 @@ void move_items_to_new_subfolder(const uuid_vec_t& selected_uuids, const std::st
gInventory.createNewCategory(first_item->getParentUUID(), LLFolderType::FT_NONE, folder_name, func);
}
+std::string get_category_path(LLUUID cat_id)
+{
+ LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
+ std::string localized_cat_name;
+ if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName()))
+ {
+ localized_cat_name = cat->getName();
+ }
+
+ if (cat->getParentUUID().notNull())
+ {
+ return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name;
+ }
+ else
+ {
+ return localized_cat_name;
+ }
+}
// Returns true if the item can be moved to Current Outfit or any outfit folder.
bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit)
{