diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-11-19 22:38:27 +0200 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-11-19 22:38:27 +0200 |
commit | f3c53a84d3e4605546fbe038ad8a2b863d2cc399 (patch) | |
tree | 8bb069d26affa6edc9ecfb6906cb0126c486c80f /indra/newview/lllandmarkactions.cpp | |
parent | 9b9c11778cd5d71f3b238ca5bd5b69e118d97be9 (diff) |
Fixed normal bug EXT-2348 "My Landmarks: Show On Map does nothing for landmarks from Library"
- Added callback to ensure that a landmark is loaded from the global landmark list.
- Added disabling "Map" button to indicate that a landmark info is being loaded.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/lllandmarkactions.cpp')
-rw-r--r-- | indra/newview/lllandmarkactions.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 003afafa87..70546ccae6 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -374,22 +374,34 @@ void LLLandmarkActions::onRegionResponseNameAndCoords(region_name_and_coords_cal bool LLLandmarkActions::getLandmarkGlobalPos(const LLUUID& landmarkInventoryItemID, LLVector3d& posGlobal) { - LLLandmark* landmark = LLLandmarkActions::getLandmark(landmarkInventoryItemID); + LLViewerInventoryItem* item = gInventory.getItem(landmarkInventoryItemID); + if (NULL == item) + return NULL; + + const LLUUID& asset_id = item->getAssetUUID(); + LLLandmark* landmark = gLandmarkList.getAsset(asset_id, NULL); if (NULL == landmark) return false; return landmark->getGlobalPos(posGlobal); } -LLLandmark* LLLandmarkActions::getLandmark(const LLUUID& landmarkInventoryItemID) +LLLandmark* LLLandmarkActions::getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb) { LLViewerInventoryItem* item = gInventory.getItem(landmarkInventoryItemID); if (NULL == item) return NULL; const LLUUID& asset_id = item->getAssetUUID(); - return gLandmarkList.getAsset(asset_id, NULL); + + LLLandmark* landmark = gLandmarkList.getAsset(asset_id, cb); + if (landmark) + { + return landmark; + } + + return NULL; } void LLLandmarkActions::copySLURLtoClipboard(const LLUUID& landmarkInventoryItemID) |