diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-10-22 14:46:15 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-10-22 14:46:15 -0400 |
commit | bfe759584f63c0587a2dc6a0086ad9d5b6c63a56 (patch) | |
tree | 84653a1211908c7dd2ce5bc4877e79f8e6515099 /indra/newview/llinventorybridge.cpp | |
parent | 62fc3ceaf5251458239f91192a05edc64bedf33b (diff) | |
parent | 394f7b37f2ec05c7cfb32c350432886f1c493c85 (diff) |
Merge branch 'develop' into marchcat/xcode-16
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 57e5030602..2deb7caad5 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -691,11 +691,6 @@ bool LLInvFVBridge::isClipboardPasteableAsLink() const { return false; } - if (item->getAssetUUID().isNull()) - { - // otehrwise AIS will return 'Cannot link to items with a NULL asset_id.' - return false; - } } const LLViewerInventoryCategory *cat = model->getCategory(item_id); if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType())) @@ -4194,6 +4189,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()) |