Skip to content

Draft: Change behaviour of toggle layer properties actions

Before this commit, toggle layer properties (visibility, alpha lock, lock, and alpha channel disabledness) actions were only setting all of the selected layers properties to the opposite of the property at the current node. This commit ensures that the actions actually toggle all layers properties (so for example if you have two layers, A and B, and A is visible, and the other is hidden, the action before this commit would set both to the same visibility, and after this commit will set A to hidden and B to visible).

This might need some discussion on whether this behaviour is expected/desired.

BUG:459683

Test Plan

  1. Create two layers.
  2. Set one to be hidden, locked, alpha-locked and disable its alpha (the other should stay with default values of those properties).
  3. Select both layers and perform actions "toggle visibility", "toggle alpha lock", "toggle alpha disabled" and "toggle lock" (easiest would be to add icons to the toolbar, search for "toggle").
  4. Previous behaviour: all of the properties in both layers are set to the same value. New behaviour: the properties are toggled, so after calling those actions, still one layer is hidden and one visible, one is locked and the other is not, etc.

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.

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Merge request reports