From 545b408618388c0484b16d7dff22b9aeb6421530 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 14 Apr 2014 22:58:14 -0700 Subject: DD-20 : Prevent pasting incompatible items in stock folders --- indra/newview/llinventorybridge.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e740a16d49..520a840f74 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4350,23 +4350,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else if (move_is_into_marketplacelistings) { - // If destination folder type is stock, check perm and type of item, if not compatible -> FALSE - if (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK) - { - // If the item is copyable (i.e. non stock) do not accept the drop in a stock folder - if (inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) - { - accept = FALSE; - } - else - { - LLInventoryModel::cat_array_t* cat_array; - LLInventoryModel::item_array_t* item_array; - gInventory.getDirectDescendentsOf(mUUID,cat_array,item_array); - // Destination stock folder must be empty OR types must be identical - accept = (!item_array->count() || (item_array->get(0)->getInventoryType() == inv_item->getInventoryType())); - } - } + accept = (getCategory() && getCategory()->acceptItem(inv_item)); } LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); -- cgit v1.2.3