Skip to content
Snippets Groups Projects
Commit 08cbeea3 authored by Loren Shih's avatar Loren Shih
Browse files

EXT-2583 : Some sidepanel inventory folders appear blank

Starting sidepanel inventory folders as open by default.
Also did some minor syntactic cleanup on the folder filter iterators.

--HG--
branch : avatar-pipeline
parent fed26cf7
No related branches found
No related tags found
No related merge requests found
...@@ -1253,6 +1253,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) ...@@ -1253,6 +1253,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
// filter self only on first pass through // filter self only on first pass through
LLFolderViewItem::filter( filter ); LLFolderViewItem::filter( filter );
} }
if (mDontShowInHierarchy)
{
setOpen();
}
} }
if (getRoot()->getDebugFilters()) if (getRoot()->getDebugFilters())
...@@ -1286,9 +1290,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) ...@@ -1286,9 +1290,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
// now query children // now query children
for (folders_t::iterator iter = mFolders.begin(); for (folders_t::iterator iter = mFolders.begin();
iter != mFolders.end();) iter != mFolders.end();
++iter)
{ {
folders_t::iterator fit = iter++; LLFolderViewFolder* folder = (*iter);
// have we run out of iterations this frame? // have we run out of iterations this frame?
if (filter.getFilterCount() < 0) if (filter.getFilterCount() < 0)
{ {
...@@ -1298,15 +1303,15 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) ...@@ -1298,15 +1303,15 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
// mMostFilteredDescendantGeneration might have been reset // mMostFilteredDescendantGeneration might have been reset
// in which case we need to update it even for folders that // in which case we need to update it even for folders that
// don't need to be filtered anymore // don't need to be filtered anymore
if ((*fit)->getCompletedFilterGeneration() >= filter_generation) if (folder->getCompletedFilterGeneration() >= filter_generation)
{ {
// track latest generation to pass any child items // track latest generation to pass any child items
if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter.getMinRequiredGeneration())) if (folder->getFiltered() || folder->hasFilteredDescendants(filter.getMinRequiredGeneration()))
{ {
mMostFilteredDescendantGeneration = filter_generation; mMostFilteredDescendantGeneration = filter_generation;
if (getRoot()->needsAutoSelect() && autoopen_folders) if (getRoot()->needsAutoSelect() && autoopen_folders)
{ {
(*fit)->setOpenArrangeRecursively(TRUE); folder->setOpenArrangeRecursively(TRUE);
} }
} }
// just skip it, it has already been filtered // just skip it, it has already been filtered
...@@ -1314,48 +1319,49 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) ...@@ -1314,48 +1319,49 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
} }
// update this folders filter status (and children) // update this folders filter status (and children)
(*fit)->filter( filter ); folder->filter( filter );
// track latest generation to pass any child items // track latest generation to pass any child items
if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter_generation)) if (folder->getFiltered() || folder->hasFilteredDescendants(filter_generation))
{ {
mMostFilteredDescendantGeneration = filter_generation; mMostFilteredDescendantGeneration = filter_generation;
if (getRoot()->needsAutoSelect() && autoopen_folders) if (getRoot()->needsAutoSelect() && autoopen_folders)
{ {
(*fit)->setOpenArrangeRecursively(TRUE); folder->setOpenArrangeRecursively(TRUE);
} }
} }
} }
for (items_t::iterator iter = mItems.begin(); for (items_t::iterator iter = mItems.begin();
iter != mItems.end();) iter != mItems.end();
++iter)
{ {
items_t::iterator iit = iter++; LLFolderViewItem* item = (*iter);
if (filter.getFilterCount() < 0) if (filter.getFilterCount() < 0)
{ {
break; break;
} }
if ((*iit)->getLastFilterGeneration() >= filter_generation) if (item->getLastFilterGeneration() >= filter_generation)
{ {
if ((*iit)->getFiltered()) if (item->getFiltered())
{ {
mMostFilteredDescendantGeneration = filter_generation; mMostFilteredDescendantGeneration = filter_generation;
} }
continue; continue;
} }
if ((*iit)->getLastFilterGeneration() >= must_pass_generation && if (item->getLastFilterGeneration() >= must_pass_generation &&
!(*iit)->getFiltered(must_pass_generation)) !item->getFiltered(must_pass_generation))
{ {
// failed to pass an earlier filter that was a subset of the current one // failed to pass an earlier filter that was a subset of the current one
// go ahead and flag this item as done // go ahead and flag this item as done
(*iit)->setFiltered(FALSE, filter_generation); item->setFiltered(FALSE, filter_generation);
continue; continue;
} }
(*iit)->filter( filter ); item->filter( filter );
if ((*iit)->getFiltered(filter.getMinRequiredGeneration())) if (item->getFiltered(filter.getMinRequiredGeneration()))
{ {
mMostFilteredDescendantGeneration = filter_generation; mMostFilteredDescendantGeneration = filter_generation;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment