summaryrefslogtreecommitdiff
path: root/indra/newview/lllocationinputctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r--indra/newview/lllocationinputctrl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 1d9220cf3d..9d14a3fbdc 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -419,8 +419,7 @@ void LLLocationInputCtrl::onInfoButtonClicked()
void LLLocationInputCtrl::onAddLandmarkButtonClicked()
{
- LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentParcel();
-
+ LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
// Landmark exists, open it for preview and edit
if(landmark && landmark->getUUID().notNull())
{
@@ -677,15 +676,16 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
}
else if (item == std::string("landmark"))
{
- LLInventoryModel::item_array_t items;
- LLLandmarkActions::collectParcelLandmark(items);
+ LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
- if(items.empty())
+ if(!landmark)
{
LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
- }else{
+ }
+ else
+ {
LLSideTray::getInstance()->showPanel("panel_places",
- LLSD().insert("type", "landmark").insert("id",items.get(0)->getUUID()));
+ LLSD().insert("type", "landmark").insert("id",landmark->getUUID()));
}
}
else if (item == std::string("cut"))