diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-05-22 05:50:50 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-05-22 05:50:50 +0800 |
commit | 0a11db8b5d0ace1b83c1b542bc966913fecb3f2a (patch) | |
tree | 3ab0baf0cc0d0a281f21be67ffcae7bc770c17a1 /indra/newview/llinventoryfunctions.cpp | |
parent | f900a9ae67c61b3e53c36c119440cbc3710a2f7c (diff) | |
parent | a31b7ae2419b4f644ddf559274f650e34212338e (diff) |
Merge tag 'Second_Life_Release#a31b7ae2-Second_Life_Release#a31b7ae-2025.04' into 2025.04
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 9967318e92..1077ce74ae 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -438,7 +438,13 @@ void copy_inventory_category(LLInventoryModel* model, { copy_inventory_category_content(new_id, model, cat, root_copy_id, move_no_copy_items); }; - gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func, cat->getThumbnailUUID()); + LLFolderType::EType type = LLFolderType::FT_NONE; + if (cat->getPreferredType() == LLFolderType::FT_OUTFIT) + { + // at the moment only permitting copy of outfits and normal folders + type = LLFolderType::FT_OUTFIT; + } + gInventory.createNewCategory(parent_id, type, cat->getName(), func, cat->getThumbnailUUID()); } void copy_inventory_category(LLInventoryModel* model, @@ -460,6 +466,25 @@ void copy_inventory_category(LLInventoryModel* model, gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func, cat->getThumbnailUUID()); } +void copy_inventory_category(LLInventoryModel* model, + LLViewerInventoryCategory* cat, + const LLUUID& parent_id, + const LLUUID& root_copy_id, + bool move_no_copy_items, + LLPointer<LLInventoryCallback> callback) +{ + // Create the initial folder + inventory_func_type func = [model, cat, root_copy_id, move_no_copy_items, callback](const LLUUID& new_id) + { + copy_inventory_category_content(new_id, model, cat, root_copy_id, move_no_copy_items); + if (callback) + { + callback.get()->fire(new_id); + } + }; + gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func, cat->getThumbnailUUID()); +} + void copy_cb(const LLUUID& dest_folder, const LLUUID& root_id) { // Decrement the count in root_id since that one item won't be copied over @@ -2365,6 +2390,12 @@ bool can_move_to_my_outfits_as_subfolder(LLInventoryModel* model, LLInventoryCat return false; } + if (inv_cat->getPreferredType() != LLFolderType::FT_NONE) + { + // only normal folders can become subfodlers + return false; + } + constexpr size_t MAX_CONTENT = 255; if (cats->size() > MAX_CONTENT) { |