Skip to content

Loosen activation requirements of layer selection actions and brush property actions/widgets

BUG:417363

In general, this merge request loosens the activation requirements of various actions and widgets.

The first commit allows usage of the "Select all X Layers" actions and the common brush property actions when nonpaintable layers are selected.

The second commit might require some discussion. It (re-?)enables usage of various common paintop widgets (brush settings, blending mode dropdown, preset selector, etc.) when non-painting tools are selected. By extension this fixes BUG:417363 as it removes the need to show the brush presets button as inactive.

I would personally argue it's better UX to allow usage of these widgets even when non-painting tools are selected, as the user will likely realize what tool they're using as soon as they hover their cursor over the canvas after use of these widgets. Blocking the UI doesn't remove the potential confusion, it just moves the potential confusion to a different place. Blocking the UI also forces users to take actions in specific orders. With this change, there'll be neither UI blockage nor will there be confusing moments from not being able to use these widgets.

Test Plan

Make sure there's no breakage from freeing up these actions on group layers and non-painting tools.

  • Use the "Select all X layers" actions on nonpaintable layers.
  • Use the brush property actions on nonpaintable layers such as Group layers, and the welcome screen.
  • Use the brush property widgets on nonpainting tools such as the Zoom tool. Make sure that the blending mode dropdown is still disabled on mypaint brushes, regardless of tool.

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.
Edited by R. B.

Merge request reports