diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-05-12 22:07:49 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-05-13 15:20:44 +0300 |
commit | e466414be4621906cb4c9cfc5f4a7216ba3670aa (patch) | |
tree | 9adde71c6a5583802949fb63a9ff8965cc54416f /indra/newview/llinventoryfunctions.cpp | |
parent | 733d65d0391f749608be599cefdd0a9c5b153ec0 (diff) |
#4055 Fix subfolder dragging
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 9967318e92..3286eca265 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -460,6 +460,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 +2384,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) { |