From 4de5576fb4bea538f3381f581d3caf54ee03fb05 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Jun 2023 22:26:04 +0300 Subject: SL-19686 Remove gallery 'skipped' items Probably whole observer is not nessesary, instead we need a general observer to track a variety of changes. --- indra/newview/llinventorygallery.cpp | 41 ------------------------------------ indra/newview/llinventorygallery.h | 3 --- 2 files changed, 44 deletions(-) diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index caf93b924c..a7dfbb5938 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -2294,33 +2294,6 @@ void LLInventoryGalleryItem::updateNameText() void LLThumbnailsObserver::changed(U32 mask) { std::vector deleted_ids; - for (item_map_t::iterator iter = mSkippedItems.begin(); - iter != mSkippedItems.end(); - ++iter) - { - const LLUUID& obj_id = (*iter).first; - LLItemData& data = (*iter).second; - - LLInventoryObject* obj = gInventory.getObject(obj_id); - if (!obj) - { - deleted_ids.push_back(obj_id); - continue; - } - - const LLUUID thumbnail_id = obj->getThumbnailUUID(); - if (data.mThumbnailID != thumbnail_id) - { - data.mThumbnailID = thumbnail_id; - data.mCallback(); - } - } - for (std::vector::iterator deleted_id = deleted_ids.begin(); deleted_id != deleted_ids.end(); ++deleted_id) - { - removeSkippedItem(*deleted_id); - } - deleted_ids.clear(); - for (item_map_t::iterator iter = mItemMap.begin(); iter != mItemMap.end(); ++iter) @@ -2361,25 +2334,11 @@ bool LLThumbnailsObserver::addItem(const LLUUID& obj_id, callback_t cb) return false; } -void LLThumbnailsObserver::addSkippedItem(const LLUUID& obj_id, callback_t cb) -{ - LLInventoryObject* obj = gInventory.getObject(obj_id); - if (obj) - { - mSkippedItems.insert(item_map_value_t(obj_id, LLItemData(obj_id, obj->getThumbnailUUID(), cb))); - } -} - void LLThumbnailsObserver::removeItem(const LLUUID& obj_id) { mItemMap.erase(obj_id); } -void LLThumbnailsObserver::removeSkippedItem(const LLUUID& obj_id) -{ - mSkippedItems.erase(obj_id); -} - //----------------------------- // Helper drag&drop functions //----------------------------- diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index d82d466aaf..e314281a07 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -348,9 +348,7 @@ public: virtual void changed(U32 mask); bool addItem(const LLUUID& obj_id, callback_t cb); - void addSkippedItem(const LLUUID& obj_id, callback_t cb); void removeItem(const LLUUID& obj_id); - void removeSkippedItem(const LLUUID& obj_id); protected: @@ -370,7 +368,6 @@ protected: typedef std::map item_map_t; typedef item_map_t::value_type item_map_value_t; item_map_t mItemMap; - item_map_t mSkippedItems; }; class LLGalleryGestureObserver : public LLGestureManagerObserver -- cgit v1.2.3