diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-04 14:26:45 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-04 14:26:45 +0200 |
commit | 6698c134b2c83b317df302f7b2f8f94124fc12e0 (patch) | |
tree | 28fb5e436f6cb183116f39c6d7fc9d0bff0365f6 /indra/newview/llpanellandmarks.cpp | |
parent | 8bd0c9058d3d24218cf59dd01f152b41240853a4 (diff) | |
parent | 7ad64438430de9a26d2c7c790eb196db4817f259 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index c9598a2576..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) { @@ -615,19 +617,21 @@ void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) { - if(!mCurrentSelectedList) return; - - LLFolderView* root_folder = mCurrentSelectedList->getRootFolder(); + LLFolderView* landmarks_folder = mLandmarksInventoryPanel->getRootFolder(); + LLFolderView* fav_folder = mFavoritesInventoryPanel->getRootFolder(); std::string command_name = userdata.asString(); if ("expand_all" == command_name) { - root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); - root_folder->arrangeAll(); + landmarks_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); + fav_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); + landmarks_folder->arrangeAll(); + fav_folder->arrangeAll(); } else if ("collapse_all" == command_name) { - root_folder->closeAllFolders(); + landmarks_folder->closeAllFolders(); + fav_folder->closeAllFolders(); } else if ( "sort_by_date" == command_name) { @@ -638,6 +642,9 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) } else { + if(!mCurrentSelectedList) return; + + LLFolderView* root_folder = mCurrentSelectedList->getRootFolder(); root_folder->doToSelected(&gInventory, userdata); } } |