From 21f70785d7d8cf5e736ab03a944be575b4f68277 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 30 Jun 2021 23:14:16 +0300 Subject: SL-15434 The 'Add to my Landmarks' star icon is not marked in the Top menu bar --- indra/newview/lllandmarklist.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 921b80a667..9106d4e986 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -74,6 +74,16 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t { return NULL; } + + if (cb) + { + // Multiple different sources can request same landmark, + // mLoadedCallbackMap is a multimap that allows multiple pairs with same key + // Todo: this might need to be improved to not hold identical callbacks multiple times + loaded_callback_map_t::value_type vt(asset_uuid, cb); + mLoadedCallbackMap.insert(vt); + } + if ( mWaitList.find(asset_uuid) != mWaitList.end() ) { // Landmark is sheduled for download, but not requested yet @@ -89,12 +99,6 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t return NULL; } } - - if (cb) - { - loaded_callback_map_t::value_type vt(asset_uuid, cb); - mLoadedCallbackMap.insert(vt); - } if (mRequestedList.size() > MAX_SIMULTANEOUS_REQUESTS) { -- cgit v1.2.3