summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-02-27 14:48:39 -0500
committerNat Goodspeed <nat@lindenlab.com>2012-02-27 14:48:39 -0500
commit063edac43f90d2cb0d2b41db939bbf919a1a3217 (patch)
treebbf1d446baef80933f6be80d05734d68144ae4cc /indra/newview/lltooldraganddrop.cpp
parent6f53796ccf4dc29368920a322baeaceb3fd2266f (diff)
parente7ab3da7a7f5c68e3544a64c30f011762572995a (diff)
Automated merge with file:///Users/nat/linden/viewer-leap-daggy
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 6910b8eced..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,
@@ -626,6 +628,8 @@ BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask)
void LLToolDragAndDrop::handleDeselect()
{
mToolTipMsg.clear();
+
+ LLToolTipMgr::instance().blockToolTips();
}
// protected
@@ -642,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;
@@ -767,6 +777,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 );
}
}
@@ -865,7 +890,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))