From 52c7aeb480095063b6b407d7fbc51fd781e1d1a7 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 11 Oct 2023 14:31:21 +0200 Subject: SL-20432 Buildfix --- indra/newview/llwearableitemslist.cpp | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'indra/newview/llwearableitemslist.cpp') diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 8681f7c14e..a684cdc86e 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -781,30 +781,27 @@ void LLWearableItemsList::updateList(const LLUUID& category_id) void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uuids) { // nothing to update - if (changed_items_uuids.empty()) return; - - typedef std::vector item_panel_list_t; - - item_panel_list_t items; - getItems(items); + if (changed_items_uuids.empty()) + return; - for (item_panel_list_t::iterator items_iter = items.begin(); - items_iter != items.end(); - ++items_iter) + pairs_const_iterator_t pairs_iter = getItemPairs().begin(), pairs_end = getItemPairs().end(); + while (pairs_iter != pairs_end) { - LLPanelInventoryListItemBase* item = dynamic_cast(*items_iter); - if (!item) continue; + LLPanel* panel = (*(pairs_iter++))->first; + LLPanelInventoryListItemBase* item = dynamic_cast(panel); + if (!item) + continue; LLViewerInventoryItem* inv_item = item->getItem(); - if (!inv_item) continue; + if (!inv_item) + continue; LLUUID linked_uuid = inv_item->getLinkedUUID(); - for (uuid_vec_t::const_iterator iter = changed_items_uuids.begin(); - iter != changed_items_uuids.end(); - ++iter) + uuid_vec_t::const_iterator uuids_iter = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end(); + while (uuids_iter != uuids_end) { - if (linked_uuid == *iter) + if (linked_uuid == *(uuids_iter++)) { item->setNeedsRefresh(true); break; -- cgit v1.2.3 From f02bc604e1f898d18d997fdf13c47ade1df853d0 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 11 Oct 2023 15:20:07 +0200 Subject: SL-20432 Minor polishing in LLWearableItemsList::updateChangedItems --- indra/newview/llwearableitemslist.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'indra/newview/llwearableitemslist.cpp') diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index a684cdc86e..83d2b16a86 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -784,6 +784,7 @@ void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uui if (changed_items_uuids.empty()) return; + uuid_vec_t::const_iterator uuids_begin = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end(); pairs_const_iterator_t pairs_iter = getItemPairs().begin(), pairs_end = getItemPairs().end(); while (pairs_iter != pairs_end) { @@ -797,16 +798,10 @@ void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uui continue; LLUUID linked_uuid = inv_item->getLinkedUUID(); - - uuid_vec_t::const_iterator uuids_iter = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end(); - while (uuids_iter != uuids_end) - { - if (linked_uuid == *(uuids_iter++)) - { - item->setNeedsRefresh(true); - break; - } - } + if (std::find(uuids_begin, uuids_end, linked_uuid) != uuids_end) + { + item->setNeedsRefresh(true); + } } } -- cgit v1.2.3 From 136a993ef2fad587cb61d5aa2b142ac9119d2e42 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 11 Oct 2023 20:56:25 +0200 Subject: SL-20419 Receiving new objects or items, etc causes inventory to switch from recent to my inventory tab --- indra/newview/llwearableitemslist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llwearableitemslist.cpp') diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 83d2b16a86..948fe55e0d 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -797,7 +797,7 @@ void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uui if (!inv_item) continue; - LLUUID linked_uuid = inv_item->getLinkedUUID(); + const LLUUID& linked_uuid = inv_item->getLinkedUUID(); if (std::find(uuids_begin, uuids_end, linked_uuid) != uuids_end) { item->setNeedsRefresh(true); -- cgit v1.2.3 From a62f5bfac1e55455c67e1c36eb388af99795dab6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 14 Oct 2023 02:40:59 +0300 Subject: SL-20232 Allow deletion of worn items #1 --- indra/newview/llwearableitemslist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llwearableitemslist.cpp') diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 948fe55e0d..49c35c7ad5 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -925,17 +925,17 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu() registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id)); registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id)); registrar.add("Wearable.TakeOffDetach", - boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids)); + boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids, no_op)); // Register handlers for clothing. registrar.add("Clothing.TakeOff", - boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids)); + boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids, no_op)); // Register handlers for body parts. // Register handlers for attachments. registrar.add("Attachment.Detach", - boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids)); + boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids, no_op)); registrar.add("Attachment.Touch", boost::bind(handle_attachment_touch, selected_id)); registrar.add("Attachment.Profile", boost::bind(show_item_profile, selected_id)); registrar.add("Object.Attach", boost::bind(LLViewerAttachMenu::attachObjects, ids, _2)); -- cgit v1.2.3