diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-06 18:31:52 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-06 18:31:52 -0500 |
commit | 9c048d12fdd9fd9c95cc93223fc731ee7b548294 (patch) | |
tree | 4d6e91028b4ab48b6600c34f9cf126610fbce690 /indra/newview/llpanellandmarks.cpp | |
parent | 2aa981ac23bbdf2fd609e04434179be0cfec79ce (diff) | |
parent | f3bbcfb9d41b41f8c4b144ae9a1173fc7719b88c (diff) |
merge
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index cb5f471837..dc0a49b6e2 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)); } } } |