Created attachment 113516 [details] [^ *.kra with text file to reproduce the bug] Hi, When I edit paragraph with multi-lines of text in certain conditions(often) they transform into single line as soon as I edit them. To reproduce: ============= - Open the Krita file in attachement. - On the vector "txt" layer, select the text - Edit the text Result: ======= - On the WYSIWYG area the two lines merge into one
Created attachment 113518 [details] (video example) Hi. I can confirm. In my case it always happens when text is center or right aligned.
Thank you @mvowada for finding the exact condition, and the video very well made to demo the bug.
*** Bug 396518 has been marked as a duplicate of this bug. ***
I can confirm this, although in my case it happens regardless the text alignment. Any editing of the previously created multi-line text(created using enter-key to change lines) destroys that line-break information completely.
Really annoying, a single missed dot in a text and you have to redo all of the line-breaks in the text :(
@katearcher89 : Yes, that's one of my top annoying bug of the moment. It prevents me to storyboard Pepper&Carrot episode in Krita as I did in the past (eg. https://www.peppercarrot.com/extras/temp/2017-06-30_screenshot_163319_net.jpg ) because each time I have to edit a speechbubble I have to redo the correct line-break. And that, even when I just edit a single word or a punctuation. So, I abandoned the idea of using Krita text tool. I wish this bug could get a higher priority.
(In reply to David REVOY from comment #6) > @katearcher89 : Yes, that's one of my top annoying bug of the moment. > > It prevents me to storyboard Pepper&Carrot episode in Krita as I did in the > past (eg. > https://www.peppercarrot.com/extras/temp/2017-06-30_screenshot_163319_net.jpg > ) because each time I have to edit a speechbubble I have to redo the > correct line-break. And that, even when I just edit a single word or a > punctuation. So, I abandoned the idea of using Krita text tool. I wish this > bug could get a higher priority. My problem with it exactly the same -- every time I do speech bubbles it's a quite the pain. Not a such deal breaker as for you since I'm still not abandoned text tools in krita but definitely frustrating a lot.
Here are results my investigations: Saving multiline SVG text ========================= It is working. (screenshot: https://www.peppercarrot.com/extras/temp/2018-09-23_screenshot_150851_net.jpg) The markup is like that: <tspan x="54.390625pt">This line one</tspan> <tspan x="54.390625pt" dy="21pt">This is line two</tspan> If saved as *.kra file and then *.kra unziped; the SVG data layer contains same markup. Loading multiline SVG text (editing) ==================================== Broken. (screenshot: https://www.peppercarrot.com/extras/temp/2018-09-23_screenshot_151238_net.jpg) The markup is like that: <tspan x="100.1171875pt">This line oneThis is line two</tspan> The two <tspan> markup were merged. Probably a rule a bit too aggressive of merging similar markup (a sort of SVG autoclean?). I tried to look at libs/flake/text/KoSvgTextChunkShape.cpp to find how this cleanup was performed into KoSvgTextChunkShape::loadSvgTextNode (around line 694) and manually modify hasNextSibling and hasPreviousSibling rules with tspan. I unfortunately failed at tweaking something that could solve the bug... Help?
More investigations: Bug didn't existed into krita-4.0.0-x86_64.appimage (20 March = git tag 4.0.0) Bug was introduced at: krita-4.0.1-x86_64.appimage (10 april = git tag 4.0.1) I tried to rebuild 4.0.0 but even if it builds, the app crashes at start-up. I tried to rebuild a git version between 4.0.0 and 4.0.1, crashes too at startup. So, I can't test what commit exactly introduced the bug ¯\(ツ)/¯
Hm, unless I misunderstand something, I still see the issue happening with the 4.0.0 appimage: I select the text shape, open the editor and close it. The two lines will be joined up into one line.
Hi Boud. Here my 4.0.0appimage can't reproduce it (while 4.0.1 can): you can see it in this short video: https://www.peppercarrot.com/extras/temp/2018-09-25_Multine-bug_comparing-Krita400and401appimage.webm
@boud: I can confirm 4.0.0 bugs also with the *.kra in attachement. 4.0.0 does the multiline text well only if generated from scratch in 4.0.0. This observation made me investigate more. Here is the content of the SVG inside the *.kra of the bugged file in attachement: <tspan x="49.0546875">main critic: Github-like </tspan> <tspan x="49.0546875" dy="17">--> NEED FIX</tspan> While working generated text box multiline done from scratch in 4.0.0 looks like: <tspan>Lorem ipsum dolor sit amet, </tspan> <tspan x="0" dy="21pt">consectetur adipiscing elit.</tspan> I tried to unzip the bugged *.kra, change the SVG to: <tspan>main critic: Github-like </tspan><tspan x="0" dy="17">--> NEED FIX</tspan> https://www.peppercarrot.com/extras/temp/txt.kra
[...] (sorry I accidentally hit <tab> + <spacebar> while tapping, it immediately sent the previous message, not finished!) so: I tried to unzip the bugged *.kra, change the SVG to: <tspan>main critic: Github-like </tspan> <tspan x="0" dy="17">--> NEED FIX</tspan> (file here https://www.peppercarrot.com/extras/temp/txt.kra) and suddently, even git~master can edit the multiline! My guess; the newest way to add coordinate of tspan with same x data merge them together (getting two time <tspan x="49.0546875">).
Just to keep the history, it was reported that this commit might be related: https://phabricator.kde.org/R37:ea60cd8a930334fc544284034bc5c4d797b3e94b
Git commit e90873b8dbcac9dc69d5d15cf05bc3a2572a1b69 by Dmitry Kazakov. Committed on 26/09/2018 at 09:04. Pushed by dkazakov into branch 'master'. Fix saving line breaks when the text is not left aligned M +20 -12 libs/flake/text/KoSvgTextShapeMarkupConverter.cpp https://commits.kde.org/krita/e90873b8dbcac9dc69d5d15cf05bc3a2572a1b69
Git commit c767686e98214dca653796005161336b49fe288d by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 26/09/2018 at 09:11. Pushed by rempt into branch 'krita/4.1'. Fix saving line breaks when the text is not left aligned M +20 -12 libs/flake/text/KoSvgTextShapeMarkupConverter.cpp https://commits.kde.org/krita/c767686e98214dca653796005161336b49fe288d