summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDenis Serdjuk <dserduk@productengine.com>2009-11-03 21:34:14 +0200
committerDenis Serdjuk <dserduk@productengine.com>2009-11-03 21:34:14 +0200
commit80ec865c2b4863d0c9b29885ee834c8af75c8813 (patch)
treea76f9c7e03c2feda1da120afd5e31df9c827eae8 /indra/newview
parent90f03ea00b0db2de6a09f176c634ae8836a404e8 (diff)
fixed minor bug EXT-1618 Add Landmark does nothing if resident stands exactly in the location of existing landmark
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellandmarks.cpp14
1 files changed, 8 insertions, 6 deletions
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<<llendl;
- return;
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
}
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
}
else if ("category" == command_name)
{