Merge changes for STORM-2008
"Remove from outfit" should deactivate gestures in a folder as well as take off items Credit to Lance Corrimal
This commit is contained in:
@@ -1537,6 +1537,18 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id)
|
|||||||
uuids_to_remove.push_back(item->getUUID());
|
uuids_to_remove.push_back(item->getUUID());
|
||||||
}
|
}
|
||||||
removeItemsFromAvatar(uuids_to_remove);
|
removeItemsFromAvatar(uuids_to_remove);
|
||||||
|
|
||||||
|
// deactivate all gestures in the outfit folder
|
||||||
|
LLInventoryModel::item_array_t gest_items;
|
||||||
|
getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false);
|
||||||
|
for(U32 i = 0; i < gest_items.count(); ++i)
|
||||||
|
{
|
||||||
|
LLViewerInventoryItem* gest_item = gest_items.get(i);
|
||||||
|
if (LLGestureMgr::instance().isGestureActive(gest_item->getLinkedUUID()))
|
||||||
|
{
|
||||||
|
LLGestureMgr::instance().deactivateGesture(gest_item->getLinkedUUID());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a copy of src_id + contents as a subfolder of dst_id.
|
// Create a copy of src_id + contents as a subfolder of dst_id.
|
||||||
@@ -3976,6 +3988,11 @@ void LLAppearanceMgr::wearBaseOutfit()
|
|||||||
|
|
||||||
void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
|
void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
|
||||||
{
|
{
|
||||||
|
if (ids_to_remove.empty())
|
||||||
|
{
|
||||||
|
llwarns << "called with empty list, nothing to do" << llendl;
|
||||||
|
}
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
|
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
|
||||||
bool fUpdateAppearance = false;
|
bool fUpdateAppearance = false;
|
||||||
for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
|
for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
|
||||||
|
|||||||
Reference in New Issue
Block a user