From 80ec865c2b4863d0c9b29885ee834c8af75c8813 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Tue, 3 Nov 2009 21:34:14 +0200 Subject: fixed minor bug EXT-1618 Add Landmark does nothing if resident stands exactly in the location of existing landmark --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 704bc309ee..5f717b51cc 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -552,14 +552,16 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const std::string command_name = userdata.asString(); if("add_landmark" == command_name) { - if(LLLandmarkActions::landmarkAlreadyExists()) + LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos(); + if(landmark) + { + LLSideTray::getInstance()->showPanel("panel_places", + LLSD().insert("type", "landmark").insert("id",landmark->getUUID())); + } + else { - std::string location; - LLAgentUI::buildLocationString(location, LLAgentUI::LOCATION_FORMAT_FULL); - llwarns<<" Landmark already exists at location: "<< location<showPanel("panel_places", LLSD().insert("type", "create_landmark")); } - LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); } else if ("category" == command_name) { -- cgit v1.2.3