Skip to content

Fix Move Tool to work without artifacts in Instant Preview mode

The patchset is basically a fix for this bug: https://bugs.kde.org/show_bug.cgi?id=400484

It does some minor changes to the UIX of the move tool:

  1. In "layer-with-content" mode, when you click on empty area outside the handles rect it will stop the move operation.
  2. Instant Preview will not be activated if you use "layer-with-content" mode and have at least one shape layer or selection mask in the image.
  3. Move Selection now works only with selection layer, it doesn't case about the option in the Tool Options.

For the technical description of the changes, please check the notes on the individual patches.

Test Plan

Testcase A:

  1. Create an image with multiple layers.
  2. Activate View->Instant Preview
  3. Start Move Tool in "Move current layer" mode
  4. Click/drag everywhere to see anything unusual :)

Testcase B:

  1. Create an image with multiple layers.
  2. Activate View->Instant Preview
  3. Start Move Tool in "Move layer with content" mode
  4. Click/drag everywhere to see anything unusual :)

Testcase C:

  1. Create an image with multiple layers.
  2. Activate View->Instant Preview
  3. Make selection
  4. Start Move Tool in any mode
  5. Click/drag everywhere to see anything unusual :)

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