summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-29 04:28:07 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-29 04:28:07 +0300
commit11b2f138cecc123c3e6876b56ea63c5fbd734d56 (patch)
tree903e92534851d3a674923bb13c038fdd700f4718 /indra/newview
parentffc4f262b259c6085773c60177c17f8339237221 (diff)
SL-19502 Copying folders should copy thumbnails
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappearancemgr.cpp7
-rw-r--r--indra/newview/llinventorybridge.cpp3
-rw-r--r--indra/newview/llinventoryfunctions.cpp2
-rw-r--r--indra/newview/llinventorygallery.cpp2
-rw-r--r--indra/newview/llinventorymodel.cpp4
-rw-r--r--indra/newview/llinventorymodel.h3
6 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 8e44411d52..a4dc0c341e 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2786,8 +2786,6 @@ void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool ap
pid = gInventory.getRootFolderID();
}
- // UDP PATH
- // D567 needs to carry over thumbnail info if present
gInventory.createNewCategory(
pid,
LLFolderType::FT_NONE,
@@ -2807,7 +2805,8 @@ void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool ap
// BAP fixes a lag in display of created dir.
gInventory.notifyObservers();
- }
+ },
+ cat->getThumbnailUUID()
);
}
else
@@ -4050,8 +4049,6 @@ void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, boo
// First, make a folder in the My Outfits directory.
const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
- // UDP PATH, should remove
- // D567 copy thumbnail info from source folder
gInventory.createNewCategory(
parent_id,
LLFolderType::FT_OUTFIT,
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1fac4dd1ad..86a3fb8ec0 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4965,7 +4965,8 @@ void LLFolderBridge::dropToMyOutfits(LLInventoryCategory* inv_cat)
gInventory.createNewCategory(dest_id,
LLFolderType::FT_OUTFIT,
inv_cat->getName(),
- func);
+ func,
+ inv_cat->getThumbnailUUID());
}
void LLFolderBridge::outfitFolderCreatedCallback(LLUUID cat_source_id, LLUUID cat_dest_id)
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 5b46dc4753..fbcce5f078 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -406,7 +406,7 @@ void copy_inventory_category(LLInventoryModel* model,
// Create the initial folder
// D567 needs to handle new fields
inventory_func_type func = boost::bind(&copy_inventory_category_content, _1, model, cat, root_copy_id, move_no_copy_items);
- gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func);
+ gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func, cat->getThumbnailUUID());
}
void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& root_copy_id, bool move_no_copy_items)
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 2624640bb4..08836555d4 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -1900,6 +1900,6 @@ void dropToMyOutfits(LLInventoryCategory* inv_cat)
// Note: creation will take time, so passing folder id to callback is slightly unreliable,
// but so is collecting and passing descendants' ids
inventory_func_type func = boost::bind(&outfitFolderCreatedCallback, inv_cat->getUUID(), _1);
- gInventory.createNewCategory(dest_id, LLFolderType::FT_OUTFIT, inv_cat->getName(), func);
+ gInventory.createNewCategory(dest_id, LLFolderType::FT_OUTFIT, inv_cat->getName(), func, inv_cat->getThumbnailUUID());
}
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 9a874350bf..70ff07c0c2 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -966,7 +966,8 @@ const LLUUID LLInventoryModel::findLibraryCategoryUUIDForType(LLFolderType::ETyp
void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
LLFolderType::EType preferred_type,
const std::string& pname,
- inventory_func_type callback)
+ inventory_func_type callback,
+ const LLUUID& thumbnail_id)
{
if (!isInventoryUsable())
{
@@ -1008,6 +1009,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
LLSD new_inventory = LLSD::emptyMap();
new_inventory["categories"] = LLSD::emptyArray();
LLViewerInventoryCategory cat(LLUUID::null, parent_id, preferred_type, name, gAgent.getID());
+ cat.setThumbnailUUID(thumbnail_id);
LLSD cat_sd = cat.asLLSD();
new_inventory["categories"].append(cat_sd);
AISAPI::CreateInventory(
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index ac6eda02d8..dcd1e87fa7 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -482,7 +482,8 @@ public:
void createNewCategory(const LLUUID& parent_id,
LLFolderType::EType preferred_type,
const std::string& name,
- inventory_func_type callback = NULL);
+ inventory_func_type callback = NULL,
+ const LLUUID& thumbnail_id = LLUUID::null);
protected:
// Internal methods that add inventory and make sure that all of
// the internal data structures are consistent. These methods