diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-10-04 07:00:54 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-10-04 07:00:54 +0800 |
commit | 5daccb743f50c7bca066d737ee18295ed38279de (patch) | |
tree | a0cd5bd3378b2fc44143658bf2677526bae4c505 /indra/newview/llagentwearables.cpp | |
parent | dcdd85e4342305bf363c76e6de1e8f8e0ea8840d (diff) | |
parent | 5d7b1b09ff195611548bababf36d412ef76ed924 (diff) |
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 53397978e0..db99f20775 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1306,8 +1306,9 @@ void LLAgentWearables::findAttachmentsAddRemoveInfo(LLInventoryModel::item_array } // Build up list of objects to be removed and items currently attached. - for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); - iter != gAgentAvatarp->mAttachmentPoints.end();) + LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + LLVOAvatar::attachment_map_t::iterator end = gAgentAvatarp->mAttachmentPoints.end(); + while (iter != end) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -1526,7 +1527,7 @@ bool LLAgentWearables::moveWearable(const LLViewerInventoryItem* item, bool clos } // static -void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, const LLUUID& parent_id) +void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, const LLUUID& parent_id, std::function<void(const LLUUID&)> created_cb) { if (type == LLWearableType::WT_INVALID || type == LLWearableType::WT_NONE) return; @@ -1538,7 +1539,7 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp); LLAssetType::EType asset_type = wearable->getAssetType(); - LLPointer<LLInventoryCallback> cb; + LLPointer<LLBoostFuncInventoryCallback> cb; if(wear) { cb = new LLBoostFuncInventoryCallback(wear_and_edit_cb); @@ -1547,6 +1548,10 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con { cb = new LLBoostFuncInventoryCallback(wear_cb); } + if (created_cb != NULL) + { + cb->addOnFireFunc(created_cb); + } LLUUID folder_id; |