SL-19502 Copying folders should copy thumbnails
parent
ffc4f262b2
commit
11b2f138ce
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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(©_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)
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue