summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-03-18 10:33:22 -0700
committerMerov Linden <merov@lindenlab.com>2015-03-18 10:33:22 -0700
commit1dd5c338d2726cc6c0f717e64d52c051d19b9732 (patch)
tree9a755058a9564428c90fdddf15e7a555552253f9
parentfca5dba9b0c9bc26e9f6ac412a308a83bd980bc5 (diff)
DD-292 : Decrement cargo count when dropping items one by one in the marketplace listings folder
-rwxr-xr-xindra/newview/llinventorybridge.cpp8
-rwxr-xr-xindra/newview/lltooldraganddrop.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index f5f494c789..4d9bfa20bb 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3446,20 +3446,22 @@ void LLFolderBridge::perform_pasteFromClipboard()
{
std::string error_msg;
const LLViewerInventoryCategory * master_folder = (move_is_into_outbox ? model->getFirstDescendantOf(outbox_id, mUUID) : model->getFirstDescendantOf(marketplacelistings_id, mUUID));
+ int index = 0;
for (std::vector<LLUUID>::const_iterator iter = objects.begin(); iter != objects.end(); ++iter)
{
const LLUUID& item_id = (*iter);
LLInventoryItem *item = model->getItem(item_id);
LLInventoryCategory *cat = model->getCategory(item_id);
- if (item && !can_move_item_to_marketplace(master_folder, dest_folder, item, error_msg, objects.size(), true))
+ if (item && !can_move_item_to_marketplace(master_folder, dest_folder, item, error_msg, objects.size() - index, true))
{
break;
}
- if (cat && !can_move_folder_to_marketplace(master_folder, dest_folder, cat, error_msg, objects.size(), true, true))
+ if (cat && !can_move_folder_to_marketplace(master_folder, dest_folder, cat, error_msg, objects.size() - index, true, true))
{
break;
}
+ ++index;
}
if (!error_msg.empty())
{
@@ -4532,7 +4534,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
const LLViewerInventoryCategory * master_folder = (move_is_into_outbox ? model->getFirstDescendantOf(outbox_id, mUUID) : model->getFirstDescendantOf(marketplacelistings_id, mUUID));
LLViewerInventoryCategory * dest_folder = getCategory();
- accept = can_move_item_to_marketplace(master_folder, dest_folder, inv_item, tooltip_msg, LLToolDragAndDrop::instance().getCargoCount());
+ accept = can_move_item_to_marketplace(master_folder, dest_folder, inv_item, tooltip_msg, LLToolDragAndDrop::instance().getCargoCount() - LLToolDragAndDrop::instance().getCargoIndex());
}
// Check that the folder can accept this item based on folder/item type compatibility (e.g. stock folder compatibility)
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index de501ea32a..63be1ef09b 100755
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -89,6 +89,7 @@ public:
void setCargoCount(U32 count) { mCargoCount = count; }
void resetCargoCount() { mCargoCount = 0; }
U32 getCargoCount() const { return (mCargoCount > 0) ? mCargoCount : mCargoIDs.size(); }
+ S32 getCargoIndex() const { return mCurItemIndex; }
static S32 getOperationId() { return sOperationId; }