summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfolderviewmodelinventory.cpp27
-rw-r--r--indra/newview/llinventoryfilter.cpp4
-rw-r--r--indra/newview/llpanelobjectinventory.cpp1
3 files changed, 13 insertions, 19 deletions
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 5ad94bfaba..49b72485e0 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -71,7 +71,7 @@ bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>&
void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder )
{
LLFastTimer _(FTM_INVENTORY_SORT);
- llinfos << "Merov : LLFolderViewModelInventory::sort of instance = " << mModelInstance << llendl;
+ llinfos << "Merov : LLFolderViewModelInventory::sort of instance = " << mModelInstance << ", folder = " << folder->getName() << llendl;
if (!needsSort(folder->getViewModelItem())) return;
@@ -155,11 +155,12 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
{
S32 filter_generation = filter.getCurrentGeneration();
- bool continue_filtering = true;
+// bool continue_filtering = true;
+ bool new_filtered_item = false;
if (item->getLastFilterGeneration() < filter_generation)
{
// recursive application of the filter for child items
- continue_filtering = item->filter( filter );
+ new_filtered_item = item->filter( filter );
}
// track latest generation to pass any child items, for each folder up to root
@@ -174,7 +175,7 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
}
}
- return continue_filtering;
+ return new_filtered_item;
}
bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
@@ -186,10 +187,6 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
{
llinfos << "Merov : LLFolderViewModelItemInventory::filter : special NOUNOURS case, filter count = " << filter.getFilterCount() << ", must pass = " << must_pass_generation << ", current = " << filter_generation << ", item last = " << getLastFilterGeneration() << ", folder last = " << getLastFolderFilterGeneration() << llendl;
}
- else
- {
- llinfos << "Merov : LLFolderViewModelItemInventory::filter : filter count = " << filter.getFilterCount() << llendl;
- }
if (getLastFilterGeneration() >= must_pass_generation
&& getLastFolderFilterGeneration() >= must_pass_generation
@@ -199,12 +196,14 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
// go ahead and flag this item as done
setPassedFilter(false, filter_generation);
setPassedFolderFilter(false, filter_generation);
- return true;
+ return false;
}
const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) ? filter.checkFolder(this) : true;
setPassedFolderFilter(passed_filter_folder, filter_generation);
+ bool new_filtered_item = false;
+
if (!mChildren.empty()
&& (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass
|| descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement
@@ -214,7 +213,8 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
iter != end_iter && filter.getFilterCount() > 0;
++iter)
{
- if (!filterChildItem((*iter), filter))
+ new_filtered_item |= filterChildItem((*iter), filter);
+ if (filter.getFilterCount() <= 0)
{
break;
}
@@ -230,12 +230,9 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
const bool passed_filter = filter.check(this);
setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
- return true;
- }
- else
- {
- return false;
+ new_filtered_item |= passed_filter;
}
+ return new_filtered_item;
}
LLFolderViewModelInventory* LLInventoryPanel::getFolderViewModel()
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index eef0adda52..d3f5d68708 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -104,10 +104,6 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
{
llinfos << "Merov : LLInventoryFilter::check : Here we go with our special NOUNOURS case, checked for string '" << mFilterSubString << "', passed = " << passed << ", name = " << listener->getSearchableName() << llendl;
}
- else
- {
- llinfos << "Merov : LLInventoryFilter::check : checked for string '" << mFilterSubString << "', passed = " << passed << ", name = " << listener->getSearchableName() << llendl;
- }
return passed;
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 7555ac7b2c..4d8fa07336 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1492,6 +1492,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
mIsInventoryEmpty(TRUE),
mInventoryNeedsUpdate(FALSE)
{
+ llinfos << "Merov : LLPanelObjectInventory::LLPanelObjectInventory, name = " << getName() << ", label = " << getLabel() << llendl;
// Setup context menu callbacks
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelObjectInventory::doToSelected, this, _2));
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));