diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-06-08 16:08:36 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-06-08 16:08:36 +0300 |
commit | 29078e7696c0cdee21e336ddb701f6c7966a33e0 (patch) | |
tree | 723218d73a3ae4cdd544a5874060968550409dcf /indra/newview/llappearancemgr.cpp | |
parent | e9e6862513476f83734d9edb7da79d2a009f1c4a (diff) |
MAINT-6473 Request for Drag & Drop functionality for adding images to Outfit Folders
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index cc676550ab..e7e85467cd 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -27,6 +27,7 @@ #include "llviewerprecompiledheaders.h" #include <boost/lexical_cast.hpp> +#include <boost/foreach.hpp> #include "llaccordionctrltab.h" #include "llagent.h" #include "llagentcamera.h" @@ -1515,6 +1516,26 @@ void LLAppearanceMgr::replaceCurrentOutfit(const LLUUID& new_outfit) wearInventoryCategory(cat, false, false); } +// Remove existing photo link from outfit folder. +void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id) +{ + LLInventoryModel::cat_array_t sub_cat_array; + LLInventoryModel::item_array_t outfit_item_array; + gInventory.collectDescendents( + outfit_id, + sub_cat_array, + outfit_item_array, + LLInventoryModel::EXCLUDE_TRASH); + BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array) + { + LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem(); + if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE) + { + gInventory.removeItem(outfit_item->getUUID()); + } + } +} + // Open outfit renaming dialog. void LLAppearanceMgr::renameOutfit(const LLUUID& outfit_id) { |