diff options
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index e24fa14e1e..413d8ed756 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -264,11 +264,14 @@ void LLLandmarksPanel::updateFilteredAccordions() accordion_tab = *iter; inventory_list = dynamic_cast<LLInventorySubTreePanel*> (accordion_tab->getAccordionView()); if (NULL == inventory_list) continue; + // This doesn't seem to work correctly. Disabling for now. -Seraph + /* LLFolderView* fv = inventory_list->getRootFolder(); - bool has_descendants = fv->hasFilteredDescendants(); accordion_tab->setVisible(has_descendants); + */ + accordion_tab->setVisible(TRUE); } // we have to arrange accordion tabs for cases when filter string is less restrictive but @@ -457,6 +460,19 @@ void LLLandmarksPanel::onAccordionExpandedCollapsed(const LLSD& param, LLInvento mCurrentSelectedList = NULL; updateVerbs(); } + + // Start background fetch, mostly for My Inventory and Library + if (expanded) + { + const LLUUID &cat_id = inventory_list->getStartFolderID(); + // Just because the category itself has been fetched, doesn't mean its child folders have. + /* + if (!gInventory.isCategoryComplete(cat_id)) + */ + { + gInventory.startBackgroundFetch(cat_id); + } + } } void LLLandmarksPanel::deselectOtherThan(const LLInventorySubTreePanel* inventory_list) @@ -730,13 +746,14 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const { return canSelectedBeModified(command_name); } - else if ( "sort_by_date" == command_name) - { - return mSortByDate; - } else if("create_pick" == command_name) { - return !LLAgentPicksInfo::getInstance()->isPickLimitReached(); + std::set<LLUUID> selection; + if ( mCurrentSelectedList && mCurrentSelectedList->getRootFolder()->getSelectionList(selection) ) + { + return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); + } + return false; } else { |