Skip to content

Fix disabling blend mode combo for MyPaint brushes

Carsten Hartenfels requested to merge hartenfels/krita:mypaintblendmodes into master

MyPaint brushes don't support custom blend modes, they always use what MyPaint calls "Normal and Erase". The code already made an attempt to disable the blend mode combo box to represent that, but switching tools caused it to re-enable itself, despite having no effect.

This commit fixes that: the brush blend mode combo box gets disabled upon switching tools if a MyPaint brush preset is selected. It also adds a comment explaining the reason behind that rather non-obvious special case.

BUG: 445206

There's an attachment on that bug showing the errorneous behavior: https://bugsfiles.kde.org/attachment.cgi?id=143569

Test Plan

Select a MyPaint brush preset. Toggle between the Freehand Brush Tool and the Line Tool. Observe that the brush blending mode combo box doesn't incorrectly re-enable itself like it used to.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports