Bug 439131

Summary: Detached brush editor does not respect brush changes done via the Python API
Product: [Applications] krita Reporter: Alan North <alanscodelog>
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: griffinvalley
Priority: NOR Keywords: triaged
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
See Also: https://bugs.kde.org/show_bug.cgi?id=435502
Latest Commit: Version Fixed In:

Description Alan North 2021-06-24 21:35:22 UTC
SUMMARY
I found this because I have a plugin that sets the brush size, but was able to reproduce with the Scripter plugin.

STEPS TO REPRODUCE
1. Open Scripter plugin, paste:

win = Krita.instance().activeWindow()
view = win.activeView()
view.setBrushSize(5)

2. Open brush editor (in detached mode).
3. Run script.

OBSERVED RESULT
Note that the brush size changes in the toolbar but not the brush editor.

Changing anything in the brush editor causes the size to reset to what the brush editor thinks it is.

This also happens with opacity (setPaintingOpacity) and I'm guessing anything else that can be set via the API.

EXPECTED RESULT
Changes are "applied" everywhere.

SOFTWARE/OS VERSIONS
Windows 10
Krita Nightly 4407898
Comment 1 wolthera 2021-09-09 13:20:24 UTC
Related to https://bugs.kde.org/show_bug.cgi?id=435502
Comment 2 Alan North 2021-09-11 01:19:05 UTC
Seeing that other bug report, it looks more like the bug is the brush editor was never designed to "listen" to external changes since it didn't need to be, although strange the sliders do affect it. Did not think to test this at the time, but any changes that can be made via the popup palette brush hud are also a problem.