From 465632214aad5e9979d12247149aa716a23d6899 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Mon, 14 Aug 2023 17:18:52 -0700 Subject: SL-20024: Fix inventory not marked dirty for drag and drop if copy permission bit is unset --- indra/newview/lltooldraganddrop.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltooldraganddrop.cpp') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 23a6634154..afcdb26f1a 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1012,8 +1012,12 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, { hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true); } - // TODO: Check to see if adding the item was successful; if not, then - // we should return false here. + // Force the object to update and refetch its inventory so it has this asset. + hit_obj->dirtyInventory(); + hit_obj->requestInventory(); + // TODO: Check to see if adding the item was successful; if not, then + // we should return false here. This will requre a separate listener + // since without listener, we have no way to receive update } else if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) -- cgit v1.2.3