From 46cc8496f0c2405342b0892a673bcf69cc13847b Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 2 May 2018 12:24:14 +0300 Subject: MAINT-8553 Allow copy a link or copy a folder containing a link in inventory. --- indra/newview/llinventorybridge.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 67b51f11b3..29e63e4bca 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -779,6 +779,14 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (obj) { + + items.push_back(std::string("Copy Separator")); + items.push_back(std::string("Copy")); + if (!isItemCopyable()) + { + disabled_items.push_back(std::string("Copy")); + } + if (obj->getIsLinkType()) { items.push_back(std::string("Find Original")); @@ -821,13 +829,6 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Copy Asset UUID")); } } - items.push_back(std::string("Copy Separator")); - - items.push_back(std::string("Copy")); - if (!isItemCopyable()) - { - disabled_items.push_back(std::string("Copy")); - } items.push_back(std::string("Cut")); if (!isItemMovable() || !isItemRemovable()) @@ -2104,12 +2105,6 @@ BOOL LLItemBridge::isItemCopyable() const return FALSE; } - // You can never copy a link. - if (item->getIsLinkType()) - { - return FALSE; - } - return item->getPermissions().allowCopyBy(gAgent.getID()) || gSavedSettings.getBOOL("InventoryLinking"); } return FALSE; @@ -3812,6 +3807,11 @@ void LLFolderBridge::perform_pasteFromClipboard() break; } } + else if (item->getIsLinkType()) + { + link_inventory_object(parent_id, item_id, + LLPointer(NULL)); + } else { copy_inventory_item( -- cgit v1.2.3 From 22a33cc8d72e2053c363efcd89823a387e5e518e Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 2 May 2018 16:15:43 +0300 Subject: fix line endings --- indra/newview/llinventorybridge.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 29e63e4bca..90a000c196 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3807,10 +3807,10 @@ void LLFolderBridge::perform_pasteFromClipboard() break; } } - else if (item->getIsLinkType()) - { - link_inventory_object(parent_id, item_id, - LLPointer(NULL)); + else if (item->getIsLinkType()) + { + link_inventory_object(parent_id, item_id, + LLPointer(NULL)); } else { -- cgit v1.2.3