summaryrefslogtreecommitdiff
path: root/indra/newview/lllandmarkactions.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-20 19:24:07 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-20 19:24:07 +0200
commitd0c1593d85cd26ad822d31e21df7a1864d66541c (patch)
tree30ceb3cfc19ccb36b7bcc7f0e5a2ad3efdd38747 /indra/newview/lllandmarkactions.cpp
parent9d64bf132e27739dedeca17a1d952655c6b52ac3 (diff)
parent0c468557b9e38ec4be201fa991499ed095a4d8c3 (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lllandmarkactions.cpp')
-rw-r--r--indra/newview/lllandmarkactions.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index 003afafa87..d50b68b624 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 false;
+
+ 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)