summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2012-02-22 22:33:57 +0200
committerSeth ProductEngine <slitovchuk@productengine.com>2012-02-22 22:33:57 +0200
commit26d33527a345ad6fe4b6deba8c120fe435e95f77 (patch)
tree825ff8492ba8294d13564acfa1a26a3445fc0a6a /indra/newview/llinventoryfilter.cpp
parent11c53b444d77788044fe0e164fde4364b8206564 (diff)
EXP-1335 FIXED Dragging folders into Recent Items disabled.
- Dragging folder into Recent Items disabled, but allowed within Recent Items. - Dragging Contents folder from task inventory disabled. - Filtering folder contents upon dragging to any inventory panel added, to make the behavior consistent with items filtering during DnD.
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r--indra/newview/llinventoryfilter.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 4971ded634..5496c273f2 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -121,16 +121,35 @@ bool LLInventoryFilter::check(const LLInventoryItem* item)
return passed;
}
-bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder)
+bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) const
{
- // we're showing all folders, overriding filter
- if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
+ if (!folder)
{
- return true;
+ llwarns << "The filter can not be checked on an invalid folder." << llendl;
+ llassert(false); // crash in development builds
+ return false;
}
const LLFolderViewEventListener* listener = folder->getListener();
+ if (!listener)
+ {
+ llwarns << "Folder view event listener not found." << llendl;
+ llassert(false); // crash in development builds
+ return false;
+ }
+
const LLUUID folder_id = listener->getUUID();
+
+ return checkFolder(folder_id);
+}
+
+bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
+{
+ // we're showing all folders, overriding filter
+ if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
+ {
+ return true;
+ }
if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY)
{