Skip to content

Fix Discrete Canvas Rotation sometimes skipping steps

Before this commit the Discrete Canvas Rotation mode would be unable to snap to the original rotation if starting from an angle that was a multiple of 15 (including 0). This was due to the mode trying to ignore snapping to that angle at the start of the action, but ignoring that angle was applied to the whole action. This commit fixes that issue.

BUG:429637

Test Plan

  1. Set starting angle to some interval of 15 and use the discrete rotate mode (you should now be to return to your original angle)
  2. Set starting angle to a number not divisible by 15 and use the discrete rotate mode (should just behave exactly as before this commit)

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