diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-05 18:44:35 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-05 18:44:35 -0500 |
| commit | f5b82a377256d5806ec101e8a9d90533ea1a3bf9 (patch) | |
| tree | 9070a3bc30b7666452605eed234fcda98205341e /indra/newview/llappearancemgr.cpp | |
| parent | d8f0bc021f3e7e18e3918178f3c81cdf444fb0d3 (diff) | |
For EXT-4919: Initial gesture setup is wrong for new users. Added a template-y mechanism for roundtripping an inventory fetch - hopefully could replace some gratuitous classes elsewhere as well.
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
| -rw-r--r-- | indra/newview/llappearancemgr.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 6c4c59c4e7..6a0d5312ee 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -48,6 +48,31 @@ #include "llviewerregion.h" #include "llwearablelist.h" +LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name) +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + LLNameCategoryCollector has_name(name); + gInventory.collectDescendentsIf(parent_id, + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + has_name); + if (0 == cat_array.count()) + return LLUUID(); + else + { + LLViewerInventoryCategory *cat = cat_array.get(0); + if (cat) + return cat->getUUID(); + else + { + llwarns << "null cat" << llendl; + return LLUUID(); + } + } +} + // support for secondlife:///app/appearance SLapps class LLAppearanceHandler : public LLCommandHandler { @@ -538,6 +563,8 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID LLFolderType::FT_NONE, src_cat->getName()); shallowCopyCategoryContents(src_id, subfolder_id, cb); + + gInventory.notifyObservers(); } // Copy contents of src_id to dst_id. |
