diff options
author | Merov Linden <merov@lindenlab.com> | 2014-04-14 22:58:14 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-04-14 22:58:14 -0700 |
commit | 545b408618388c0484b16d7dff22b9aeb6421530 (patch) | |
tree | f9c60c78842c1f584dfe19d93334a60a7d24ecd3 /indra/newview/llinventorybridge.cpp | |
parent | 65e53b70f276ff765fdd38b511563508459d0768 (diff) |
DD-20 : Prevent pasting incompatible items in stock folders
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
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); |