Skip to content

452267 Fix transform tool move keys with non-default pivot

Mathias Wein requested to merge (removed):bug-452267-transform-keys into master

It turned out that KisToolTransform::translateX() and KisToolTransform::setTranslateX() don't agree on what point to work on. So I made both use the transform center, since the global position of the anchor point is basically only derived in the GUI and not directly accessible.

I figured it needs a merge request because:

  • those functions are from a QProperty that was apparently introduced for the deceased Krita Sketch/Krita Gemini, so I'm not sure if there's still any expected behavior
  • it involves strokes, and I'm not 100% sure if this way of modifying the parameters and asking the stroke strategy and UI to update is really safe

This should fix BUG:452267

Test Plan

Just follow the STEPS TO REPRODUCE in the bug report and make sure that arrow and shift+arrow only move by 1 and 10 pixels respectively: https://bugs.kde.org/show_bug.cgi?id=452267

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

Loading