Bug 408099 - SVG File layers are not rendered
Summary: SVG File layers are not rendered
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (show other bugs)
Version: 4.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-30 08:47 UTC by winterhawk28
Modified: 2021-12-25 15:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description winterhawk28 2019-05-30 08:47:57 UTC
When making an SVG file layer, it imports fine at first, but if any change is made to the SVG file in an external app (such as Inkscape or Affinity Designer), the SVG file layer feature becomes permanently broken: the SVG file layer becomes invisible, and you can no longer make any new non-broken SVG file layers.

You can't make one in the same document, or even if you shut down krita, create a new .kra and a new .svg file, and try to create a new SVG file layer. It just permanently breaks for the entire app.


Also, if you close the .kra document and reopen it with SVG file layers saved in it, it also asks for your "preferred resolution" for every single SVG file layer all over again. This also happens every time you update the SVG file in Inkscape (same thing happens when I use Affinity Designer).


STEPS TO REPRODUCE
1. Make an SVG in Inkscape
2. Create a file layer linking to it in a Krita document.
3. Go back to Inkscape and make changes to the file, and save those changes.
4. Go back to Krita...the file layer is now invisible and SVG file layers are now broken all throughout Krita.
5. Bitmap (jpg, png, etc.) continue to work fine. 

Sometimes it mysteriously starts working again, but once you change the SVG file the layer is linked to (i.e., in an external app and then alt tab back to Krita), it breaks again.
Comment 1 Halla Rempt 2019-06-21 09:53:11 UTC
Hm, I can confirm that an svg file layer doesn't show anything, not even on first loading it. But if I modify the svg file, Krita pops up the resolution dialog and reloads it.
Comment 2 wolthera 2019-09-26 13:52:20 UTC
So, this seems to be fixed here? At the least, I can load an svg file, it updates properly when I change it, etc.

However, the pop-up dialog *is* pretty annoying. Looking at KisSVGImport::convert the dialog is called when it's not batchmode and at that point it takes a preferred dpi from the global user settings... I am not sure how we're supossed to store this data inside the filelayer. But maybe this is in the territory of a seperate bug report?
Comment 3 M 2021-12-25 15:11:38 UTC
No, I can confirm this issue is still present on a Krita 5.1.0 daily build on Windows (git 7af8eaa).
You can try https://commons.wikimedia.org/wiki/File:Test.svg. If drag-and-dropped into a document and choosing as File Layer it will appear as a completely transparent layer, if choosing as new Layer or as a Reference Image it renders properly.
Also strangely, if choosing the new layer option it takes a solid 10 seconds for the resolution dialog to appear and the Krita window is completely frozen in the meantime. That delay is not present when I try the same thing in 4.4.8, and I don't remember it being a problem in an older 5.1 daily.