From c6a82a44f8c2efcad535c941bd00567a23f4fe7b 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 ef2a7fee113c33387a0c7aff2aa862f715a564af 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 b134e91d2a2e7ff97e6f906d6ef36177e1dddeab 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