summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-12-16 10:43:57 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-12-16 10:43:57 -0800
commit16778677868620874b8b042f6c62712c9d28f2fb (patch)
treed600b712ebee1e10e8efaa86b2955b321af43b3a /indra
parentf1edfc73efa526735b2a80d47e2381a2b46295df (diff)
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.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorybridge.cpp5
-rw-r--r--indra/newview/lltooldraganddrop.h2
2 files changed, 5 insertions, 2 deletions
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