Bug 411393 - bug(SVG Text Tool): cleaned “Rich text” field
Summary: bug(SVG Text Tool): cleaned “Rich text” field
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: 4.2.5
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL: https://github.com/Kristinita/SashaMi...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-28 16:57 UTC by nervov_fan
Modified: 2020-09-15 17:08 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 nervov_fan 2019-08-28 16:57:16 UTC
SUMMARY

If user cleaned `Rich text` field:

    font settings not applied.

https://i.imgur.com/lISfCFd.gif

DETAILS

I'm sorry, I'm can't find, what markup use for this bugtracking system, therefore I wrote my detailed issue in GitHub, where I can formatted my message use Markdown — https://github.com/Kristinita/SashaMiscellaneous/issues/28.

Thanks.
Comment 1 wolthera 2019-09-21 15:17:18 UTC
Yes, this is because the text defaults to the basic markup. There will probably never be resolved until we change the current editor.

Bugzilla doesn't have markup, we use plaintext to describe our issues here.
Comment 2 Tiar 2020-09-13 18:31:35 UTC
Git commit a24aa5c79905163619a1ac7d6659d79de54acdc4 by Agata Cacko.
Committed on 13/09/2020 at 18:31.
Pushed by tymond into branch 'master'.

Fix font options after clearing the rich text editor

Before this commit, if the rich text editor for SVG Text Tool
was cleared, the options for the text would be lost and changed
to the default ones. This commit fixes it by remembering the old options
and restoring them.

Note: it might be beneficial to consider figuring out how to set the
Format in the location just before the text instead, because that would
(partially) fix bug 411739.

M  +201  -15   plugins/tools/svgtexttool/SvgTextEditor.cpp
M  +3    -0    plugins/tools/svgtexttool/SvgTextEditor.h
M  +8    -8    plugins/tools/svgtexttool/SvgTextTool.action

https://invent.kde.org/graphics/krita/commit/a24aa5c79905163619a1ac7d6659d79de54acdc4
Comment 3 Tiar 2020-09-13 18:32:27 UTC
Git commit 19393578bbb1b100ae760085424acf32170ec4c5 by Agata Cacko.
Committed on 13/09/2020 at 18:32.
Pushed by tymond into branch 'krita/4.3'.

Fix font options after clearing the rich text editor

Before this commit, if the rich text editor for SVG Text Tool
was cleared, the options for the text would be lost and changed
to the default ones. This commit fixes it by remembering the old options
and restoring them.

Note: it might be beneficial to consider figuring out how to set the
Format in the location just before the text instead, because that would
(partially) fix bug 411739.


(cherry picked from commit a24aa5c79905163619a1ac7d6659d79de54acdc4)

M  +201  -15   plugins/tools/svgtexttool/SvgTextEditor.cpp
M  +3    -0    plugins/tools/svgtexttool/SvgTextEditor.h
M  +8    -8    plugins/tools/svgtexttool/SvgTextTool.action

https://invent.kde.org/graphics/krita/commit/19393578bbb1b100ae760085424acf32170ec4c5
Comment 4 Tiar 2020-09-15 15:30:58 UTC
Git commit fe20ff434cd7fded59c85b2d5a33eded3aca1fe9 by Agata Cacko.
Committed on 15/09/2020 at 15:26.
Pushed by tymond into branch 'master'.

Fix text marked modified when Text Editor is opened

Before this commit, text would be marked modified if you opened
a document with text and just opened the Text Editor.
This was a regression from a24aa5c7 (a fix for bug 411393).
This commit fixes that behaviour.

Additionally I renamed setShape to setInitialShape because the fix
relies on the function being called only once, at the very opening
of the editor.

M  +2    -2    plugins/tools/svgtexttool/SvgTextEditor.cpp
M  +1    -1    plugins/tools/svgtexttool/SvgTextEditor.h
M  +1    -1    plugins/tools/svgtexttool/SvgTextTool.cpp

https://invent.kde.org/graphics/krita/commit/fe20ff434cd7fded59c85b2d5a33eded3aca1fe9
Comment 5 Tiar 2020-09-15 15:31:27 UTC
Git commit e6de213a7e3fdeade18a9ee09019907793bf7e08 by Agata Cacko.
Committed on 15/09/2020 at 15:31.
Pushed by tymond into branch 'krita/4.3'.

Fix text marked modified when Text Editor is opened

Before this commit, text would be marked modified if you opened
a document with text and just opened the Text Editor.
This was a regression from a24aa5c7 (a fix for bug 411393).
This commit fixes that behaviour.

Additionally I renamed setShape to setInitialShape because the fix
relies on the function being called only once, at the very opening
of the editor.


(cherry picked from commit fe20ff434cd7fded59c85b2d5a33eded3aca1fe9)

M  +2    -2    plugins/tools/svgtexttool/SvgTextEditor.cpp
M  +1    -1    plugins/tools/svgtexttool/SvgTextEditor.h
M  +1    -1    plugins/tools/svgtexttool/SvgTextTool.cpp

https://invent.kde.org/graphics/krita/commit/e6de213a7e3fdeade18a9ee09019907793bf7e08
Comment 6 Tyson Tan 2020-09-15 16:51:07 UTC
Hi Tymond, coming from your request in bug 392473 here. I'm not sure I understand this bug. With krita-4.4.0-alpha-69d2027-x86_64.appimage, when I cleared the Rich Text Editor, it still remembers the old settings.
Comment 7 Tiar 2020-09-15 17:08:10 UTC
In the 4.3.0 if you do:
1. Write text
2. Change the font, font size, color, etc. etc.
3. Delete text
4. Write new text

It would be:
Before the fix:
- text uses settings from point 1.
After the fix (and expected):
- text uses settings from point 2. 

@Tyson the version you're using is one day too old for this fix :) Maybe you could download a new one and check. If not, I'll just wait for beta testing.

In any case, thanks for checking!