summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-10-23 12:00:12 +0800
committerErik Kundiman <erik@megapahit.org>2025-10-25 20:03:33 +0800
commitab9976389fe5e4c254d3eb2c39fd2dff083d8d2d (patch)
treecf14ec0d25efd065a1471debb74080ef41763fbf /indra/newview/llinventorybridge.cpp
parent790a7d1ccfa5b1a20a3b5295f839670793ced950 (diff)
parent01823996196c11aea905200fe267463d520d285b (diff)
Merge tag 'Second_Life_Release#01823996-2025.08' into 2025.08
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index f508935799..1ec7ec85c9 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4390,6 +4390,32 @@ void LLFolderBridge::pasteLinkFromClipboard()
std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
+ if (objects.size() == 0)
+ {
+ LLClipboard::instance().setCutMode(false);
+ return;
+ }
+
+ LLUUID& first_id = objects[0];
+ LLInventoryItem* item = model->getItem(first_id);
+ if (item && item->getAssetUUID().isNull())
+ {
+ if (item->getActualType() == LLAssetType::AT_NOTECARD)
+ {
+ // otehrwise AIS will return 'Cannot link to items with a NULL asset_id.'
+ LLNotificationsUtil::add("CantLinkNotecard");
+ LLClipboard::instance().setCutMode(false);
+ return;
+ }
+ else if (item->getActualType() == LLAssetType::AT_MATERIAL)
+ {
+ LLNotificationsUtil::add("CantLinkMaterial");
+ LLClipboard::instance().setCutMode(false);
+ return;
+ }
+ }
+
+
LLPointer<LLInventoryCallback> cb = NULL;
LLInventoryPanel* panel = mInventoryPanel.get();
if (panel->getRootFolder()->isSingleFolderMode())