From 912833bafa9a59734432787158e36b66ee9586aa Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 4 Jan 2012 14:04:32 -0800 Subject: EXP-1738 FIX -- Disable drag and drop to folders in the outbox that would create a hierarchy that contains too many folders * Updated drag and drop to correctly handle moving to and from outbox as opposed to within the outbox when dealing with folder and item count limitations related to depth and total folder count. --- indra/newview/lltooldraganddrop.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/lltooldraganddrop.cpp') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 6910b8eced..6338ea477c 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -626,6 +626,8 @@ BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask) void LLToolDragAndDrop::handleDeselect() { mToolTipMsg.clear(); + + LLToolTipMgr::instance().blockToolTips(); } // protected -- cgit v1.2.3 From 98a85b1bf2d7decf477d3d1076859fdeec6f1b46 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 9 Jan 2012 13:39:58 -0800 Subject: EXP-1159 FIX -- User can get No transfer items into Merchant Outbox by rezzing object from Outbox, including No Transfer item in contents, and then taking back into Inventory * Drag and drop to the 3D world is now disabled from the outbox --- indra/newview/lltooldraganddrop.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltooldraganddrop.cpp') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 6338ea477c..5a4d177709 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -769,6 +769,21 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (!handled) { + // Disallow drag and drop to 3D from the outbox + const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); + if (outbox_id.notNull()) + { + for (S32 item_index = 0; item_index < (S32)mCargoIDs.size(); item_index++) + { + if (gInventory.isObjectDescendentOf(mCargoIDs[item_index], outbox_id)) + { + *acceptance = ACCEPT_NO; + mToolTipMsg = LLTrans::getString("TooltipOutboxDragToWorld"); + return; + } + } + } + dragOrDrop3D( x, y, mask, drop, acceptance ); } } @@ -867,7 +882,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) (U32)mLastAccept, (U32)callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target)) - (hit_obj, hit_face, pick_info.mKeyMask, FALSE)); + (hit_obj, hit_face, pick_info.mKeyMask, FALSE)); } if (mDrop && ((U32)mLastAccept >= ACCEPT_YES_COPY_SINGLE)) -- cgit v1.2.3 From ba41aea4b2813ac96cad2bae7c82da6e5eefd63a Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 12 Jan 2012 17:01:23 -0800 Subject: EXP-1795 FIX -- Update warning dialog for dragging and dropping no-copy items to Merchant Outbox * Any drag and drop or copy operation to the merchant outbox that contains one or more no-copy items now brings up a single modal dialog prompting the user to move the no-copy items to the outbox or to leave them all behind. --- indra/newview/lltooldraganddrop.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/lltooldraganddrop.cpp') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 5a4d177709..8c32dfcb4d 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -282,6 +282,8 @@ void LLCategoryDropDescendentsObserver::done() } */ +S32 LLToolDragAndDrop::sOperationId = 0; + LLToolDragAndDrop::DragAndDropEntry::DragAndDropEntry(dragOrDrop3dImpl f_none, dragOrDrop3dImpl f_self, dragOrDrop3dImpl f_avatar, @@ -644,6 +646,12 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, mToolTipMsg.clear(); + // Increment the operation id for every drop + if (drop) + { + sOperationId++; + } + if (top_view) { handled = TRUE; -- cgit v1.2.3 From c1636911c84f948e542f445d3c7495e6df185912 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 1 Feb 2012 19:09:29 -0800 Subject: EXP-1862 : Make LLClipboard an LLSingleton and clean up the internals (set up for toolbar and never used) --- indra/newview/lltooldraganddrop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltooldraganddrop.cpp') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 8c32dfcb4d..f3637756fe 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -48,6 +48,7 @@ #include "llpreviewnotecard.h" #include "llrootview.h" #include "llselectmgr.h" +#include "lltoolbarview.h" #include "lltoolmgr.h" #include "lltooltip.h" #include "lltrans.h" @@ -2527,7 +2528,7 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( } else if(mSource == SOURCE_VIEWER) { - item = (LLViewerInventoryItem*)gClipboard.getSourceObject(); + item = (LLViewerInventoryItem*)gToolBarView->getDragItem(); } if(item) return item; if(cat) return cat; -- cgit v1.2.3 From c1e47e0acab0d82ae25d65d64ac22afca6f2bd12 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 2 Feb 2012 12:22:00 -0800 Subject: EXP-1856 FIX -- Calling cards, library items, 'no transfer' objects can be copied to Merchant outbox via ctrl-v * Viewer now applies the same logic as inventory drag and drop to clipboard paste operations. --- indra/newview/lltooldraganddrop.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'indra/newview/lltooldraganddrop.cpp') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 8c32dfcb4d..c7ab934f9e 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -333,14 +333,15 @@ LLToolDragAndDrop::LLDragAndDropDictionary::LLDragAndDropDictionary() }; LLToolDragAndDrop::LLToolDragAndDrop() -: LLTool(std::string("draganddrop"), NULL), - mDragStartX(0), - mDragStartY(0), - mSource(SOURCE_AGENT), - mCursor(UI_CURSOR_NO), - mLastAccept(ACCEPT_NO), - mDrop(FALSE), - mCurItemIndex(0) +: LLTool(std::string("draganddrop"), NULL), + mCargoCount(0), + mDragStartX(0), + mDragStartY(0), + mSource(SOURCE_AGENT), + mCursor(UI_CURSOR_NO), + mLastAccept(ACCEPT_NO), + mDrop(FALSE), + mCurItemIndex(0) { } -- cgit v1.2.3