summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r--indra/newview/llpanellandmarks.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 91e1590dc3..c516546282 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
- * Copyright (c) 2001-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -101,6 +101,8 @@ BOOL LLLandmarksPanel::postBuild()
initLandmarksInventroyPanel();
initMyInventroyPanel();
initLibraryInventroyPanel();
+ getChild<LLAccordionCtrlTab>("tab_favorites")->setDisplayChildren(true);
+ getChild<LLAccordionCtrlTab>("tab_landmarks")->setDisplayChildren(true);
gIdleCallbacks.addFunction(LLLandmarksPanel::doIdle, this);
return TRUE;
@@ -422,6 +424,7 @@ void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLIn
mAccordionTabs.push_back(accordion_tab);
accordion_tab->setDropDownStateChangedCallback(
boost::bind(&LLLandmarksPanel::onAccordionExpandedCollapsed, this, _2, inventory_list));
+ accordion_tab->setDisplayChildren(false);
}
void LLLandmarksPanel::onAccordionExpandedCollapsed(const LLSD& param, LLInventorySubTreePanel* inventory_list)
@@ -553,14 +556,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)
{
@@ -584,7 +589,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
menu_create_inventory_item(mCurrentSelectedList->getRootFolder(),
dynamic_cast<LLFolderBridge*> (folder_bridge), LLSD(
"category"), gInventory.findCategoryUUIDForType(
- LLAssetType::AT_LANDMARK));
+ LLFolderType::FT_LANDMARK));
}
}
}