diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-05 16:37:23 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-05 16:37:23 -0500 |
commit | d8f0bc021f3e7e18e3918178f3c81cdf444fb0d3 (patch) | |
tree | 651f1dbb8af59acb803ff2d8a83f5b74764423b8 /indra/newview/llappearancemgr.cpp | |
parent | 2b5a3de8096fa9a4e8c523aab22493adf7411d3f (diff) |
For EXT-4919: Initial gesture setup is wrong for new users. Checkpointing work in progress.
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0fe236c056..6c4c59c4e7 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -519,9 +519,31 @@ void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, boo LLAppearanceManager::instance().updateCOF(category,append); } +// Create a copy of src_id + contents as a subfolder of dst_id. void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb) { + LLInventoryCategory *src_cat = gInventory.getCategory(src_id); + if (!src_cat) + { + llwarns << "folder not found for src " << src_id.asString() << llendl; + return; + } + LLUUID parent_id = dst_id; + if(parent_id.isNull()) + { + parent_id = gInventory.getRootFolderID(); + } + LLUUID subfolder_id = gInventory.createNewCategory( parent_id, + LLFolderType::FT_NONE, + src_cat->getName()); + shallowCopyCategoryContents(src_id, subfolder_id, cb); +} + +// Copy contents of src_id to dst_id. +void LLAppearanceManager::shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id, + LLPointer<LLInventoryCallback> cb) +{ LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; gInventory.collectDescendents(src_id, cats, items, |