diff options
author | Merov Linden <merov@lindenlab.com> | 2014-05-20 21:40:48 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-05-20 21:40:48 -0700 |
commit | 8193caa7939643d1080ceb9463b3e3978b0f516a (patch) | |
tree | e22b332b5a0227b93d35c02d491a168faea0b48b /indra/newview/lltooldraganddrop.cpp | |
parent | 23acc30e2709dac1aa54eecda5c1bc6b2b226b5b (diff) |
DD-88 : Make Drag and Drop tooltips for Merchant Outbox and Marketplace restrictions identical
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rwxr-xr-x | indra/newview/lltooldraganddrop.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 1a137f7129..21d670c307 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -812,6 +812,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (!handled) { + // *TODO: Suppress the "outbox" case once "marketplace" is used everywhere for everyone // Disallow drag and drop to 3D from the outbox const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); if (outbox_id.notNull()) @@ -826,6 +827,20 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } } } + // Disallow drag and drop to 3D from the marketplace + const LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + if (marketplacelistings_id.notNull()) + { + for (S32 item_index = 0; item_index < (S32)mCargoIDs.size(); item_index++) + { + if (gInventory.isObjectDescendentOf(mCargoIDs[item_index], marketplacelistings_id)) + { + *acceptance = ACCEPT_NO; + mToolTipMsg = LLTrans::getString("TooltipOutboxDragToWorld"); + return; + } + } + } dragOrDrop3D( x, y, mask, drop, acceptance ); } |