summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-12-13 11:15:01 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-12-13 11:15:01 -0800
commit9fcdec3e34d689ccfb74fb4905fa975f5819270a (patch)
treec990665fc598b219a551e8b6e3e2382fce4f06e2 /indra/newview/llinventorybridge.cpp
parent181eaa8196d19d5d0c1db17fe27bd2bdee11525b (diff)
EXP-1679 FIX -- Collapse links that are dragged to the outbox
* Links are automatically tracked back to their source when dragged to the outbox * Worn items are now allowed into the outbox
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 33b9af7a78..3f12e8b1d3 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -72,6 +72,7 @@
// Marketplace outbox current disabled
#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1
+#define BLOCK_WORN_ITEMS_IN_OUTBOX 0
typedef std::pair<LLUUID, LLUUID> two_uuids_t;
typedef std::list<two_uuids_t> two_uuids_list_t;
@@ -1101,6 +1102,8 @@ BOOL LLInvFVBridge::canListOnMarketplace() const
BOOL LLInvFVBridge::canListOnMarketplaceNow() const
{
#if ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU
+
+#if BLOCK_WORN_ITEMS_IN_OUTBOX
if (get_is_item_worn(mUUID))
{
return FALSE;
@@ -1112,6 +1115,7 @@ BOOL LLInvFVBridge::canListOnMarketplaceNow() const
{
return FALSE;
}
+#endif // BLOCK_WORN_ITEMS_IN_OUTBOX
return TRUE;
#else
@@ -1787,19 +1791,32 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_msg)
{
- bool worn = get_is_item_worn(inv_item->getUUID());
+ // Collapse links directly to items/folders
+ LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item;
+ LLViewerInventoryItem * linked_item = viewer_inv_item->getLinkedItem();
+ if (linked_item != NULL)
+ {
+ inv_item = linked_item;
+ }
+
bool allow_transfer = inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
if (!allow_transfer)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNoTransfer");
+ return false;
}
- else if(worn)
+
+#if BLOCK_WORN_ITEMS_IN_OUTBOX
+ bool worn = get_is_item_worn(inv_item->getUUID());
+ if (worn)
{
tooltip_msg = LLTrans::getString("TooltipOutboxWorn");
+ return false;
}
-
- return !worn && allow_transfer;
+#endif
+
+ return true;
}