diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-10-09 16:21:58 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-10-09 17:49:15 +0300 |
commit | 7b6baea0f6c9c4c9a4f69fdbed4d11f0d5a80018 (patch) | |
tree | 53863cb8e620c882a8239df6b4b9ce1b8b1d373e /indra | |
parent | 0f9d2dca38049224d555b725d23008f6e1a6467d (diff) |
viewer#2818 Creating a link to an empty notecard fails #2
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llinventorygallerymenu.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 57e5030602..114fdf1d9f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -691,7 +691,9 @@ bool LLInvFVBridge::isClipboardPasteableAsLink() const { return false; } - if (item->getAssetUUID().isNull()) + if (item->getAssetUUID().isNull() + && (item->getActualType() == LLAssetType::AT_NOTECARD + || item->getActualType() == LLAssetType::AT_MATERIAL)) { // otehrwise AIS will return 'Cannot link to items with a NULL asset_id.' return false; diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index 320cbcdb1e..2b2b1d7005 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -772,7 +772,9 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men { disabled_items.push_back(std::string("Paste As Link")); } - else if (selected_item->getAssetUUID().isNull()) + else if (selected_item->getAssetUUID().isNull() + && (selected_item->getActualType() == LLAssetType::AT_NOTECARD + || selected_item->getActualType() == LLAssetType::AT_MATERIAL)) { disabled_items.push_back(std::string("Paste As Link")); } |