summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewmodelinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderviewmodelinventory.cpp')
-rw-r--r--indra/newview/llfolderviewmodelinventory.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index d53cf2a9a3..b93dfaf061 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -232,8 +232,9 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
return true;
}
*/
-
- const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) ? filter.checkFolder(this) : true;
+
+ bool is_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY);
+ const bool passed_filter_folder = is_folder ? filter.checkFolder(this) : true;
setPassedFolderFilter(passed_filter_folder, filter_generation);
bool continue_filtering = true;
@@ -258,7 +259,7 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
{
// This is where filter check on the item done (CHUI-849)
const bool passed_filter = filter.check(this);
- if (passed_filter && mChildren.empty()) // Update the latest filter generation for empty folders
+ if (passed_filter && mChildren.empty() && is_folder) // Update the latest filter generation for empty folders
{
LLFolderViewModelItemInventory* view_model = this;
while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)