diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index cc4bfcae1..1014f41db 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -78,6 +78,7 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llvoavatar.h"
+#include "llworldmap.h"
#include "llwearable.h"
#include "llwearablelist.h"
@@ -4437,6 +4438,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Landmark Separator"));
items.push_back(std::string("Teleport To Landmark"));
+ items.push_back(std::string("Show On Map"));
}
// Disable "About Landmark" menu item for
@@ -4445,6 +4447,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if ((flags & FIRST_SELECTED_ITEM) == 0)
{
disabled_items.push_back(std::string("Teleport To Landmark"));
+ disabled_items.push_back(std::string("Show On Map"));
}
hide_context_entries(menu, items, disabled_items);
@@ -4484,6 +4487,14 @@ void LLLandmarkBridge::performAction(LLInventoryModel* model, std::string action
open_landmark(item, std::string(" Landmark: ") + item->getName(), FALSE);
}
}
+ else if ("show_on_map" == action)
+ {
+ if (const LLViewerInventoryItem* item = getItem())
+ {
+ gFloaterWorldMap->trackLandmark(item->getUUID());
+ LLFloaterWorldMap::show(true);
+ }
+ }
else
{
LLItemBridge::performAction(model, action);
diff --git a/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/indra/newview/skins/default/xui/en-us/menu_inventory.xml
index 24baaa63c..26b40db6f 100644
--- a/indra/newview/skins/default/xui/en-us/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en-us/menu_inventory.xml
@@ -257,6 +257,9 @@
mouse_opaque="true" name="Teleport To Landmark" width="128">
+
+
+