From 7b6baea0f6c9c4c9a4f69fdbed4d11f0d5a80018 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 9 Oct 2024 16:21:58 +0300 Subject: viewer#2818 Creating a link to an empty notecard fails #2 --- indra/newview/llinventorybridge.cpp | 4 +++- 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")); } -- cgit v1.2.3