summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
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))