Bug 408441

Summary: Deleting all the text in the 'Edit Text' box returns the font to default settings. Changing font settings with no text present will revert to default settings when typing.
Product: [Applications] krita Reporter: jimbo <loudsquid>
Component: Tool/TextAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ghevan
Priority: NOR    
Version: 4.2.1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description jimbo 2019-06-08 01:33:41 UTC
SUMMARY
When editing text you usually change the font first, then select all the placeholder text and start typing. However if you hit Backspace/Delete after selecting all the text, the font you have selected defaults to MS Shell Dig 2, Regular, 8px, Black.

STEPS TO REPRODUCE
1. Open a new document and select the text tool
2. In the 'Edit Text' popup box change the font type, size and colour
3. Select all of the placeholder text and delete it

OBSERVED RESULT
The font now defaults to MS Shell Dig 2, Regular, 8px, Black.

EXPECTED RESULT
The font should keep it's settings when deleting all text.

SOFTWARE/OS VERSIONS
Windows: Windows 7 Professional 64 bit
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
If there is no text present (i.e. you deleted it all) and then you go to change the font as described above, when you start to type again, Krita will default to MS Shell Dig 2. This issue is probably tied into the above.

Also, the 'Edit Text' popup box has a blank title, shouldn't it say 'Edit Text - Krita'? I'm nitpicking now but I'd thought I'd mention it while on the subject.

Thanks for all your hard work!
Comment 1 vanyossi 2019-06-08 02:08:52 UTC
I can confir this bug
Comment 2 Halla Rempt 2019-06-12 14:33:46 UTC
Git commit 4a319b8b642af39f8ce3193d89649845c2d1dff0 by Boudewijn Rempt.
Committed on 12/06/2019 at 13:57.
Pushed by rempt into branch 'master'.

Give the text editor a clearer window title

M  +1    -0    plugins/tools/svgtexttool/SvgTextTool.cpp

https://invent.kde.org/kde/krita/commit/4a319b8b642af39f8ce3193d89649845c2d1dff0
Comment 3 Halla Rempt 2019-06-13 06:33:14 UTC
Git commit 48922b3058b2653a5053a64d517a7cf9294bd244 by Boudewijn Rempt.
Committed on 13/06/2019 at 06:02.
Pushed by rempt into branch 'krita/4.2'.

Give the text editor a clearer window title

M  +1    -0    plugins/tools/svgtexttool/SvgTextTool.cpp

https://invent.kde.org/kde/krita/commit/48922b3058b2653a5053a64d517a7cf9294bd244
Comment 4 Dmitry Kazakov 2019-06-13 12:38:30 UTC
Git commit 4664bf09c2991c70cc240e6d3428c7b92cd61d62 by Dmitry Kazakov.
Committed on 13/06/2019 at 12:37.
Pushed by dkazakov into branch 'master'.

Make sure the text style is not reset when we remove the last character

Just set default document style to the lastly used font

M  +5    -0    plugins/tools/svgtexttool/SvgTextEditor.cpp

https://invent.kde.org/kde/krita/commit/4664bf09c2991c70cc240e6d3428c7b92cd61d62
Comment 5 Halla Rempt 2019-06-17 08:18:04 UTC
Git commit de8c324e3a48071290935ebfd75de136050036e8 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 17/06/2019 at 08:16.
Pushed by rempt into branch 'krita/4.2'.

Make sure the text style is not reset when we remove the last character

Just set default document style to the lastly used font

M  +5    -0    plugins/tools/svgtexttool/SvgTextEditor.cpp

https://invent.kde.org/kde/krita/commit/de8c324e3a48071290935ebfd75de136050036e8