summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2014-04-22 19:27:25 +0300
committerandreykproductengine <akleshchev@productengine.com>2014-04-22 19:27:25 +0300
commit331663458fbf0a434701b1bb1dd15901eb1c20fe (patch)
treef42f105886a114bb3bc8177e7591718338cd749f /indra/newview
parent29e0c3b18fe7dc504a898c7f50a372731a4fa291 (diff)
MAINT-1344 FIXED Attempting to move a folder or item, to another folder in a different inventory window found via inventory search, fails.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llinventorybridge.cpp25
-rwxr-xr-xindra/newview/llinventoryfilter.cpp5
-rwxr-xr-xindra/newview/llinventoryfilter.h1
3 files changed, 25 insertions, 6 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 75a4c22d33..00ae3e6afc 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2263,6 +2263,9 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
&& (LLToolDragAndDrop::SOURCE_AGENT == source);
BOOL accept = FALSE;
+ U64 filter_types = filter->getFilterTypes();
+ BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
+
if (is_agent_inventory)
{
const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH, false);
@@ -2461,7 +2464,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
is_movable = active_folder_view != NULL;
}
- if (is_movable)
+ if (is_movable && use_filter)
{
// Check whether the folder being dragged from active inventory panel
// passes the filter of the destination panel.
@@ -2635,6 +2638,12 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
BOOL accept = FALSE;
BOOL is_move = FALSE;
+ BOOL use_filter = FALSE;
+ if (filter)
+ {
+ U64 filter_types = filter->getFilterTypes();
+ use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
+ }
// coming from a task. Need to figure out if the person can
// move/copy this item.
@@ -2667,7 +2676,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
accept = TRUE;
}
- if (filter && accept)
+ if (accept && use_filter)
{
accept = filter->check(item);
}
@@ -3993,6 +4002,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
BOOL accept = FALSE;
+ U64 filter_types = filter->getFilterTypes();
+ // We shouldn't allow to drop non recent items into recent tab (or some similar transactions)
+ // while we are allowing to interact with regular filtered inventory
+ BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
LLViewerObject* object = NULL;
if(LLToolDragAndDrop::SOURCE_AGENT == source)
{
@@ -4091,7 +4104,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from active inventory panel
// passes the filter of the destination panel.
- if (accept && active_panel)
+ if (accept && active_panel && use_filter)
{
LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID());
if (!fv_item) return false;
@@ -4229,7 +4242,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from in world
// passes the filter of the destination panel.
- if (accept)
+ if (accept && use_filter)
{
accept = filter->check(inv_item);
}
@@ -4273,7 +4286,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from notecard
// passes the filter of the destination panel.
- if (accept)
+ if (accept && use_filter)
{
accept = filter->check(inv_item);
}
@@ -4313,7 +4326,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from the library
// passes the filter of the destination panel.
- if (accept && active_panel)
+ if (accept && active_panel && use_filter)
{
LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID());
if (!fv_item) return false;
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index c314886f16..b941552f21 100755
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -985,6 +985,11 @@ void LLInventoryFilter::fromParams(const Params& params)
setDateRangeLastLogoff(params.since_logoff);
}
+U64 LLInventoryFilter::getFilterTypes() const
+{
+ return mFilterOps.mFilterTypes;
+}
+
U64 LLInventoryFilter::getFilterObjectTypes() const
{
return mFilterOps.mFilterObjectTypes;
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index ce516af0b9..094fda7707 100755
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -151,6 +151,7 @@ public:
// +-------------------------------------------------------------------+
// + Parameters
// +-------------------------------------------------------------------+
+ U64 getFilterTypes() const;
U64 getFilterObjectTypes() const;
U64 getFilterCategoryTypes() const;
U64 getFilterWearableTypes() const;