diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2024-10-10 17:06:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 17:06:08 +0300 |
commit | d69ad11a8d0d1a3b02ff75fdec7e2b230a526abc (patch) | |
tree | de6035b1b6379d6ef79260e3ce8c9e5cfb75767d /indra/newview/llinventorygallery.cpp | |
parent | 3091985d31e1ccf9aba159dec4f2d5ea31723ce0 (diff) | |
parent | d5218c05219a6bddb63d752a9df3b5d6fe1e3cf7 (diff) |
Merge branch 'develop' into maxim/lua-nearby-avatars
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r-- | indra/newview/llinventorygallery.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index c4f93cee98..03bafa48bd 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -2105,6 +2105,30 @@ void LLInventoryGallery::pasteAsLink() std::vector<LLUUID> objects; LLClipboard::instance().pasteFromClipboard(objects); + if (objects.size() == 0) + { + LLClipboard::instance().setCutMode(false); + return; + } + + LLUUID& first_id = objects[0]; + LLInventoryItem* item = gInventory.getItem(first_id); + if (item && item->getAssetUUID().isNull()) + { + if (item->getActualType() == LLAssetType::AT_NOTECARD) + { + LLNotificationsUtil::add("CantLinkNotecard"); + LLClipboard::instance().setCutMode(false); + return; + } + else if (item->getActualType() == LLAssetType::AT_MATERIAL) + { + LLNotificationsUtil::add("CantLinkMaterial"); + LLClipboard::instance().setCutMode(false); + return; + } + } + bool paste_into_root = mSelectedItemIDs.empty(); for (LLUUID& dest : mSelectedItemIDs) { |