diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-09 22:04:52 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-09 22:04:52 +0300 |
| commit | 5c6a2779c498e69e36276700283ccfb4bdbfd438 (patch) | |
| tree | 63b64b5468d7e0b201d4d72fa18f56691db4f2f6 /indra/newview/llinventoryfunctions.cpp | |
| parent | aede902040625b145d36812a3ef29e7677cb1154 (diff) | |
SL-19826 Pasting folders in Single folder should highlight pasted folder
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
| -rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 0b024536ae..034488c011 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -401,14 +401,32 @@ void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::s } void copy_inventory_category(LLInventoryModel* model, - LLViewerInventoryCategory* cat, - const LLUUID& parent_id, - const LLUUID& root_copy_id, - bool move_no_copy_items ) + LLViewerInventoryCategory* cat, + const LLUUID& parent_id, + const LLUUID& root_copy_id, + bool move_no_copy_items) +{ + // Create the initial folder + inventory_func_type func = [model, cat, root_copy_id, move_no_copy_items](const LLUUID& new_id) + { + 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()); +} + +void copy_inventory_category(LLInventoryModel* model, + LLViewerInventoryCategory* cat, + const LLUUID& parent_id, + const LLUUID& root_copy_id, + bool move_no_copy_items, + inventory_func_type callback) { // Create the initial folder - // D567 needs to handle new fields - inventory_func_type func = boost::bind(©_inventory_category_content, _1, model, cat, root_copy_id, move_no_copy_items); + 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); + callback(new_id); + }; gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func, cat->getThumbnailUUID()); } |
