diff options
author | Merov Linden <merov@lindenlab.com> | 2013-04-22 15:51:15 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-04-22 15:51:15 -0700 |
commit | 022dd124604c8a0a3d83b481d03a687556fcf2c4 (patch) | |
tree | 5ccdbfbbd55bffadb0f4033e07603e3181e14e22 | |
parent | f59af8d27c419d97596fff65fb9aa412499c52be (diff) |
CHUI-912 : Fixed! Filtering with types do work correctly again (including None).
-rw-r--r-- | indra/newview/llfolderviewmodelinventory.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llfolderviewmodelinventory.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index e2a6eb78c6..c28657dbcd 100644 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -129,11 +129,11 @@ void LLFolderViewModelItemInventory::requestSort() void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size) { - bool before = passedFilter(); LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); - bool after = passedFilter(); + bool before = mPrevPassedAllFilters; + mPrevPassedAllFilters = passedFilter(filter_generation); - if (before != after) + if (before != mPrevPassedAllFilters) { // Need to rearrange the folder if the filtered state of the item changed LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder(); @@ -316,7 +316,8 @@ bool LLInventorySort::operator()(const LLFolderViewModelItemInventory* const& a, } } -LLFolderViewModelItemInventory::LLFolderViewModelItemInventory( class LLFolderViewModelInventory& root_view_model ) - : LLFolderViewModelItemCommon(root_view_model) +LLFolderViewModelItemInventory::LLFolderViewModelItemInventory( class LLFolderViewModelInventory& root_view_model ) : + LLFolderViewModelItemCommon(root_view_model), + mPrevPassedAllFilters(false) { } diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h index 10a958a142..9dcfdfa185 100644 --- a/indra/newview/llfolderviewmodelinventory.h +++ b/indra/newview/llfolderviewmodelinventory.h @@ -59,6 +59,8 @@ public: virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0; virtual LLToolDragAndDrop::ESource getDragSource() const = 0; +protected: + bool mPrevPassedAllFilters; }; class LLInventorySort |