FIRE-15538: Link replace floater should update "remaining items" count after the item has actually been removed (wait for callback on AIS3)

meow-7.2.2
Ansariel 2016-11-12 01:52:27 +01:00
parent 11258a2ea3
commit e7f141add9
2 changed files with 13 additions and 7 deletions

View File

@ -216,6 +216,7 @@ void FSFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
}
}
LLUUID outfit_update_folder = LLUUID::null;
if (needs_wearable_ordering_update && outfit_folder_id.notNull())
{
// If a wearable item was involved in the link replace operation and replaced
@ -223,15 +224,18 @@ void FSFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
// *after* the original link has been removed. LLAppearanceMgr abuses the actual link
// description to store the clothing ordering information it. We will have to update
// the clothing ordering information or the outfit will be in dirty state when worn.
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLAppearanceMgr::updateClothingOrderingInfo,
LLAppearanceMgr::getInstance(),
outfit_folder_id,
LLPointer<LLInventoryCallback>(NULL)));
remove_inventory_object(old_item_id, cb);
outfit_update_folder = outfit_folder_id;
}
else
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&FSFloaterLinkReplace::itemRemovedCallback, this, outfit_update_folder));
remove_inventory_object(old_item_id, cb);
}
void FSFloaterLinkReplace::itemRemovedCallback(const LLUUID& outfit_folder_id)
{
if (outfit_folder_id.notNull())
{
remove_inventory_object(old_item_id, LLPointer<LLInventoryCallback>(NULL));
LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(outfit_folder_id);
}
if (mInstance)

View File

@ -35,6 +35,7 @@
class FSInventoryLinkReplaceDropTarget;
class LLButton;
class LLTextBox;
class LLInventoryCallback;
class FSFloaterLinkReplace : public LLFloater, LLEventTimer
{
@ -61,6 +62,7 @@ private:
bool needs_wearable_ordering_update,
bool needs_description_update,
const LLUUID& outfit_folder_id);
void itemRemovedCallback(const LLUUID& outfit_folder_id);
void onSourceItemDrop(const LLUUID& source_item_id);
void onTargetItemDrop(const LLUUID& target_item_id);