Pasting an SVG from a text file behaves differently from importing an SVG or copying its objects
Summary:
We can now copy text that looks like SVG from a text editor into Inkscape and get that turned into a picture.
(I wonder what will happen with all the stuff people try to paste into Inkscape now, expecting they will get a text? Will that cause crashes, because Inkscape tries to parse it?...)
It also behaves differently from importing the same thing as SVG, in that it imports layers as layers (which is kind of nice, but also inconsistent and should rather be an option).
It does not offer the option to embed the SVG like an image file, maybe it should?
Introduced in inkscape@14f53899 (note that I have no idea what the original commit and MR were, maybe there's more info? Relevant info or at least a related bug report is missing, sadly...)
Steps to reproduce:
- open Inkscape
- draw a rectangle
- save file
- open file with text editor
- Ctrl+A, Ctrl+C
- Inkscape: File > New
- Paste clipboard contents
What happened?
Compared to importing an SVG:
- there is no dialog that asks about embedding in an img tag. Should that be possible?
- layers are kept as layers (so they get to be sublayers in the current layer)
- the scale is just a quarter of the original (split out to inkscape#2417 (closed))
What should have happened?
- definitely, the scale should be correct (tracked in inkscape#2417 (closed))
- about the rest: depends, I guess. Would be nice to have an embedding option. Would also be nice to have a checkbox to keep layers in the import SVG dialog when layers are detected and have that dialog pop up, so people know what's happening.
Version Info:
- Inkscape Version: Inkscape 1.1-beta1 (4738257183, 2021-04-29)
- Operating System: Linux Mint 20.1