diff options
author | Denis Serdjuk <dserduk@productengine.com> | 2009-11-05 15:54:05 +0200 |
---|---|---|
committer | Denis Serdjuk <dserduk@productengine.com> | 2009-11-05 15:54:05 +0200 |
commit | 8cec9098cd755a4f70bcf5092d8b66a7c3c702d5 (patch) | |
tree | 36d39db4d319111849d230f74c6e785a4da553ee /indra | |
parent | 055d9f5eb4ae5d340c64ce741061558344501de4 (diff) |
implemented minor task EXT-1617 No need to expand all accordion panels in the My Landmarks.
Rollback previous incorrect behavior in changeset 45ece11eb7d8.
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 34c146826f..02bcd385e9 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -100,6 +100,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; @@ -421,6 +423,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) @@ -617,21 +620,19 @@ void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) { - LLFolderView* landmarks_folder = mLandmarksInventoryPanel->getRootFolder(); - LLFolderView* fav_folder = mFavoritesInventoryPanel->getRootFolder(); + if(!mCurrentSelectedList) return; + + LLFolderView* root_folder = mCurrentSelectedList->getRootFolder(); std::string command_name = userdata.asString(); if ("expand_all" == command_name) { - landmarks_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); - fav_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); - landmarks_folder->arrangeAll(); - fav_folder->arrangeAll(); + root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); + root_folder->arrangeAll(); } else if ("collapse_all" == command_name) { - landmarks_folder->closeAllFolders(); - fav_folder->closeAllFolders(); + root_folder->closeAllFolders(); } else if ( "sort_by_date" == command_name) { @@ -642,9 +643,6 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) } else { - if(!mCurrentSelectedList) return; - - LLFolderView* root_folder = mCurrentSelectedList->getRootFolder(); root_folder->doToSelected(&gInventory, userdata); } } |