summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-06-30 23:14:16 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-06-30 23:14:16 +0300
commit21f70785d7d8cf5e736ab03a944be575b4f68277 (patch)
tree96553c28505467e15ec044b68693210d8b1082c1
parenta4c6c7059ffc9c61bd66758dddee74383e112fe1 (diff)
SL-15434 The 'Add to my Landmarks' star icon is not marked in the Top menu bar
-rw-r--r--indra/newview/lllandmarklist.cpp16
1 files 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)
{