Removed LLUpdateAppearanceAndEditWearableOnDestroy. Use LLUpdateAppearanceOnDestroy + edit_wearable_and_customize_avatar callback.

This commit is contained in:
Shyotl
2015-07-13 15:08:32 -05:00
parent 7a5cd5b659
commit d8207424fa
3 changed files with 4 additions and 29 deletions

View File

@@ -289,7 +289,7 @@ void LLAgentWearables::AddWearableToAgentInventoryCallback::fire(const LLUUID& i
if (mTodo & CALL_WEARITEM)
{
LLAppearanceMgr::instance().addCOFItemLink(inv_item,
new LLUpdateAppearanceAndEditWearableOnDestroy(inv_item), mDescription);
new LLUpdateAppearanceOnDestroy(true, true, boost::bind(&edit_wearable_and_customize_avatar, inv_item)), mDescription);
}
}

View File

@@ -521,10 +521,6 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
}
}
LLUpdateAppearanceAndEditWearableOnDestroy::LLUpdateAppearanceAndEditWearableOnDestroy(const LLUUID& item_id):
mItemID(item_id)
{
}
void edit_wearable_and_customize_avatar(LLUUID item_id)
{
@@ -540,16 +536,6 @@ void edit_wearable_and_customize_avatar(LLUUID item_id)
}
LLUpdateAppearanceAndEditWearableOnDestroy::~LLUpdateAppearanceAndEditWearableOnDestroy()
{
if (!LLApp::isExiting())
{
LLAppearanceMgr::instance().updateAppearanceFromCOF(
true,true,
boost::bind(edit_wearable_and_customize_avatar, mItemID));
}
}
struct LLFoundData
{
@@ -1483,7 +1469,7 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
{
if (!cb && do_update)
{
cb = new LLUpdateAppearanceAndEditWearableOnDestroy(item_id_to_wear);
cb = new LLUpdateAppearanceOnDestroy(true, true, boost::bind(&edit_wearable_and_customize_avatar, item_id_to_wear));
}
LLWearableType::EType type = item_to_wear->getWearableType();
S32 wearable_count = gAgentWearables.getWearableCount(type);
@@ -1510,7 +1496,7 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
// Remove existing body parts anyway because we must not be able to wear e.g. two skins.
if (!cb && do_update)
{
cb = new LLUpdateAppearanceAndEditWearableOnDestroy(item_id_to_wear);
cb = new LLUpdateAppearanceOnDestroy(true, true, boost::bind(&edit_wearable_and_customize_avatar, item_id_to_wear));
}
removeCOFLinksOfType(item_to_wear->getWearableType(), NULL, true);
items_to_link.push_back(item_to_wear);

View File

@@ -357,19 +357,8 @@ protected:
LLUUID m_idAttachItem;
};
// [/SL:KB]
void edit_wearable_and_customize_avatar(LLUUID item_id);
class LLUpdateAppearanceAndEditWearableOnDestroy: public LLInventoryCallback
{
public:
LLUpdateAppearanceAndEditWearableOnDestroy(const LLUUID& item_id);
/* virtual */ void fire(const LLUUID& item_id) {}
~LLUpdateAppearanceAndEditWearableOnDestroy();
private:
LLUUID mItemID;
};
LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name);