Bug 439131 - Detached brush editor does not respect brush changes done via the Python API
Summary: Detached brush editor does not respect brush changes done via the Python API
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2021-06-24 21:35 UTC by Alan North
Modified: 2021-09-11 01:19 UTC (History)
1 user (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 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.