diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-04-09 13:29:39 -0400 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-04-09 13:29:39 -0400 |
| commit | 6ac9852d54d1ee4f826a08ca73f08bccf403d8c3 (patch) | |
| tree | 97a2d8e1a52ff68cdc686f8ad88c2f952c4869e5 /indra/newview/llappearancemgr.cpp | |
| parent | f1684cdea5e1086b1127993eac9a5a7b4e47321a (diff) | |
MAINT-5069 WIP, MAINT-5071 WIP - handle dropping objects and attaching from ground. WIP on better tracking of attachment requests via various message in LLSelectMgr.
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
| -rwxr-xr-x | indra/newview/llappearancemgr.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a94aa37ab7..c4dd71de89 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2650,28 +2650,23 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, LLInventoryModel::item_array_t LLAppearanceMgr::findCOFItemLinks(const LLUUID& item_id) { - LLInventoryModel::item_array_t result; - const LLViewerInventoryItem *vitem = - dynamic_cast<const LLViewerInventoryItem*>(gInventory.getItem(item_id)); - if (vitem) - { - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(LLAppearanceMgr::getCOF(), - cat_array, - item_array, - LLInventoryModel::EXCLUDE_TRASH); - for (S32 i=0; i<item_array.size(); i++) - { - const LLViewerInventoryItem* inv_item = item_array.at(i).get(); - if (inv_item->getLinkedUUID() == vitem->getLinkedUUID()) - { - result.push_back(item_array.at(i)); - } - } - } + LLUUID linked_id = get_linked_uuid(item_id); + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + gInventory.collectDescendents(LLAppearanceMgr::getCOF(), + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH); + for (S32 i=0; i<item_array.size(); i++) + { + const LLViewerInventoryItem* inv_item = item_array.at(i).get(); + if (inv_item->getLinkedUUID() == linked_id) + { + result.push_back(item_array.at(i)); + } + } return result; } |
