From 16778677868620874b8b042f6c62712c9d28f2fb Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 16 Dec 2011 10:43:57 -0800 Subject: EXP-1738 FIX EXP-1739 FIX * Initial pass to block drag and drop of multiple items when resultant outbox folder would contain too many items or folders. --- indra/newview/llinventorybridge.cpp | 5 +++-- indra/newview/lltooldraganddrop.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index adf1d6254d..ff980955e0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -60,6 +60,7 @@ #include "llpreviewtexture.h" #include "llselectmgr.h" #include "llsidepanelappearance.h" +#include "lltooldraganddrop.h" #include "lltrans.h" #include "llviewerassettype.h" #include "llviewerfoldertype.h" @@ -1962,7 +1963,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); int existing_item_count = 0; - int existing_folder_count = 1; // +1 for this folder being dragged now + int existing_folder_count = LLToolDragAndDrop::instance().getCargoIDsCount(); if (master_folder != NULL) { @@ -3461,7 +3462,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); - int existing_item_count = 1; // +1 for this item being dragged now + int existing_item_count = LLToolDragAndDrop::instance().getCargoIDsCount(); if (master_folder != NULL) { diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 92f007a251..273d23d1a0 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -86,6 +86,8 @@ public: EAcceptance getLastAccept() { return mLastAccept; } boost::signals2::connection setEndDragCallback( const enddrag_signal_t::slot_type& cb ) { return mEndDragSignal.connect(cb); } + + uuid_vec_t::size_type getCargoIDsCount() const { return mCargoIDs.size(); } protected: enum EDropTarget -- cgit v1.2.3