summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-10-20 15:41:38 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-10-20 15:41:38 +0300
commit628e28639d4c92cd9e70d4441ec737d9538eaeec (patch)
treeebec88bdd6d6cc5d0dbecec2b8856042257c8184 /indra
parent9a34791488b0d2fc68fc7bc09f0685fe42557ea4 (diff)
MAINT-7906 Inventory filter fix
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfolderviewmodelinventory.cpp7
-rw-r--r--indra/newview/llinventorypanel.cpp5
-rw-r--r--indra/newview/llpanelmaininventory.cpp20
-rw-r--r--indra/newview/llpanelmaininventory.h3
4 files changed, 9 insertions, 26 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)
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 8f93796ec7..d610b920b9 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -495,6 +495,11 @@ void LLInventoryPanel::modelChanged(U32 mask)
view_item->refresh();
}
+ LLFolderViewFolder* parent = view_item->getParentFolder();
+ if(parent)
+ {
+ parent->getViewModelItem()->dirtyDescendantsFilter();
+ }
}
}
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 7d4a05565c..f771a027e0 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -29,7 +29,6 @@
#include "llagent.h"
#include "llagentcamera.h"
-#include "llagentwearables.h"
#include "llavataractions.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@@ -180,8 +179,6 @@ BOOL LLPanelMainInventory::postBuild()
mWornItemsPanel->setFilterLinks(LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS);
mWornItemsPanel->getFilter().markDefault();
mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2));
-
- gAgentWearables.addLoadedCallback(boost::bind(&LLPanelMainInventory::updateWornItemsPanel, this));
}
mSearchTypeCombo = getChild<LLComboBox>("search_type");
if(mSearchTypeCombo)
@@ -339,18 +336,6 @@ BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask)
}
-void LLPanelMainInventory::updateWornItemsPanel()
-{
- if (!mUpdateWornTimer.getStarted())
- {
- mUpdateWornTimer.start();
- }
- else
- {
- mUpdateWornTimer.reset();
- }
-}
-
//----------------------------------------------------------------------------
// menu callbacks
@@ -685,11 +670,6 @@ void LLPanelMainInventory::draw()
mActivePanel->setSortOrder(order);
mResortActivePanel = false;
}
- if (mWornItemsPanel && mUpdateWornTimer.getStarted() && (mUpdateWornTimer.getElapsedTimeF32() > 1))
- {
- mUpdateWornTimer.stop();
- mWornItemsPanel->getFilter().setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
- }
LLPanel::draw();
updateItemcountText();
}
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index a309b3619c..5300a2c023 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -112,8 +112,6 @@ protected:
const std::string getFilterSubString();
void setFilterSubString(const std::string& string);
- void updateWornItemsPanel();
-
// menu callbacks
void doToSelected(const LLSD& userdata);
void closeAllFolders();
@@ -144,7 +142,6 @@ private:
S32 mItemCount;
std::string mItemCountString;
LLComboBox* mSearchTypeCombo;
- LLFrameTimer mUpdateWornTimer;