I've edit svg by pasting some extra elements like stroke and it worked well untill i've decided to edit text once again. Everything in this field was reset to defaults
Could you please paste your svg in a comment on this bug?
(In reply to Boudewijn Rempt from comment #1) > Could you please paste your svg in a comment on this bug? <text style="font-family:Spectral; font-size:72pt; font-size-adjust:0.166667; font-weight:600; fill:none; stroke:#e7cb8f; stroke-width:4"> <tspan x="0">МЕРТВЫЕ</tspan> </text>
CONFIRMED Application Version: Master System Info: Ubuntu 18.04 bionic (Linux) Procedure: In edit SVG text, paste the following SVG code: <text style="font-family:Spectral; font-size:72pt; font-size-adjust:0.166667; font-weight:600; fill:none; stroke:#e7cb8f; stroke-width:4"> <tspan x="0">МЕРТВЫЕ</tspan> </text> Click save and the text should update. Either close the window and edit text again or switch between Rich Text and SVG Source. After doing so, the following code will instead exist: <text style="font-family:Spectral; font-size:72pt; font-size-adjust:0.473684; font-weight:600; fill:#000000"> <tspan x="0">МЕРТВЫЕ</tspan> </text> Changing the order of the parameters (fill last, for instance) will not change the behavior. Thoughts: This bug is likely caused by missing keys or values within the SVG Source serialization.
Git commit be8023f4545b910a978a51aa456046f501f54bf7 by Dmitry Kazakov. Committed on 27/09/2018 at 13:57. Pushed by dkazakov into branch 'master'. Save the preferred text editing mode (richtext/svg) in .kra file Now text shapes can save the mode they were created in. Therefore one will not lose information because of auto-richtext-conversion when editing the text next time M +7 -1 libs/flake/svg/SvgParser.cpp M +17 -1 libs/flake/text/KoSvgTextChunkShape.cpp M +14 -0 libs/flake/text/KoSvgTextChunkShape.h M +1 -0 libs/flake/text/KoSvgTextChunkShape_p.h M +8 -2 plugins/tools/svgtexttool/SvgTextChangeCommand.cpp M +3 -1 plugins/tools/svgtexttool/SvgTextChangeCommand.h M +16 -6 plugins/tools/svgtexttool/SvgTextEditor.cpp M +2 -2 plugins/tools/svgtexttool/SvgTextEditor.h M +3 -3 plugins/tools/svgtexttool/SvgTextTool.cpp M +1 -1 plugins/tools/svgtexttool/SvgTextTool.h https://commits.kde.org/krita/be8023f4545b910a978a51aa456046f501f54bf7
Created attachment 115653 [details] (Video example) (Reopening (see video). SVG source code resets after switching to Rich Text)
Note: I can fix unneeded conversions (especially SVG -> rich text, which is lossy) when there was no change from the user on "the other side", but in case when the user makes a change on the rich editor side, it cannot really keep original svg.
Yes, that's simply not possible. Maybe we should show a warning.