Bug 443793

Summary: [text tool/color] edit a text and active color in advanced color selector auto-switch to the background color
Product: [Applications] krita Reporter: David REVOY <info>
Component: Tool/TextAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.0.0-beta2   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description David REVOY 2021-10-15 16:42:46 UTC
Hi,
After selecting a text box and pressing the Enter key to edit it; the active color in the Advanced Color Selector switch to the background color.


STEPS TO REPRODUCE
1. Setup a background color (click on the toolbar the mini square for background color, and put an obvious color: red)
2. Edit a text box (select it + Enter)
3. When the dialog pop-up, look at the advanced color selector.

OBSERVED RESULT
Active color in the Advanced Color Selector auto-switch to the background color.

EXPECTED RESULT
Active color in the Advanced Color Selector remains the foreground color selected.

SOFTWARE/OS VERSIONS
Kubuntu 20.04LTS/Appimage 5.0beta2
Comment 1 sh_zam 2021-10-19 12:22:10 UTC
Git commit 1913d805b833f9ae8de6a159db67a9f638c45502 by Sharaf Zaman.
Committed on 19/10/2021 at 12:15.
Pushed by szaman into branch 'master'.

Bugfix: Editing text makes color selector to select wrong color

When we press `Enter` this deactivates the KoFillConfigWidget, which
reverts the color to the `overriddenColor`. We change this behavior by
uploading the color of the shape back to resourceManager in SvgTextTool.

M  +16   -19   libs/ui/widgets/KoFillConfigWidget.cpp
M  +13   -1    plugins/tools/svgtexttool/SvgTextTool.cpp
M  +3    -0    plugins/tools/svgtexttool/SvgTextTool.h

https://invent.kde.org/graphics/krita/commit/1913d805b833f9ae8de6a159db67a9f638c45502
Comment 2 sh_zam 2021-10-21 11:39:59 UTC
Git commit 071b5996571f80a78fae50322405a787b1b17bb7 by Sharaf Zaman.
Committed on 21/10/2021 at 11:38.
Pushed by szaman into branch 'krita/5.0'.

Bugfix: Editing text makes color selector to select wrong color

When we press `Enter` this deactivates the KoFillConfigWidget, which
reverts the color to the `overriddenColor`. We change this behavior by
uploading the color of the shape back to resourceManager in SvgTextTool.
(cherry picked from commit 1913d805b833f9ae8de6a159db67a9f638c45502)

M  +16   -19   libs/ui/widgets/KoFillConfigWidget.cpp
M  +13   -1    plugins/tools/svgtexttool/SvgTextTool.cpp
M  +3    -0    plugins/tools/svgtexttool/SvgTextTool.h

https://invent.kde.org/graphics/krita/commit/071b5996571f80a78fae50322405a787b1b17bb7