From 1d7b46e2c32c6bdf2e6cf5a8b9dcb0c8cb767b1b Mon Sep 17 00:00:00 2001
From: Kitty Barnett <develop@catznip.com>
Date: Mon, 17 Jan 2011 10:09:52 -0500
Subject: [PATCH] VWR-24217: allow Contents folder from object to be dragged to
 inventory

---
 doc/contributions.txt                    |  1 +
 indra/newview/llpanelobjectinventory.cpp | 20 +++++---------------
 2 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index f21354b4069..839e92e0865 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -393,6 +393,7 @@ Kitty Barnett
 	STORM-288
 	STORM-799
 	STORM-800
+    VWR-24217
 Kunnis Basiat
 	VWR-82
 	VWR-102
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 211b9cf4b1a..0b6267c9e6e 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -766,22 +766,12 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
 		LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
 		if(object)
 		{
-			const LLInventoryItem *inv = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID));
-			if (inv)
+			const LLInventoryObject* cat = object->getInventoryObject(mUUID);
+			if ( (cat) && (move_inv_category_world_to_agent(mUUID, LLUUID::null, FALSE)) )
 			{
-				const LLPermissions& perm = inv->getPermissions();
-				bool can_copy = gAgent.allowOperation(PERM_COPY, perm,
-														GP_OBJECT_MANIPULATE);
-				if((can_copy && perm.allowTransferTo(gAgent.getID()))
-				   || object->permYouOwner())
-//				   || gAgent.isGodlike())
-
-				{
-					*type = LLViewerAssetType::lookupDragAndDropType(inv->getType());
-
-					*id = inv->getUUID();
-					return TRUE;
-				}
+				*type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
+				*id = mUUID;
+				return TRUE;
 			}
 		}
 	}
-- 
GitLab