Skip to content

Edit Shapes tool: make moving points _move_ points by a delta instead of snapping them to the cursor

Previosly what would happen is that the point you're moving would snap to the tip of your mouse cursor, which made making fine adjustments incredibly frustrating.

Now when you click and hold a point it will only move as many pixels as you move your mouse.

I also took the liberty of renaming a couple variables to better reflect their purpose now, hopefully that is okay.

Test Plan

  1. Open Krita.
  2. Create a new document.
  3. Create a vector layer.
  4. Draw a Bézier curve on that vector layer.
  5. Start editing the curve.
  6. Try to drag a point around, and observe how the point moves with your mouse cursor rather than snapping to its tip. (not a control point, those work perfectly fine!)

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 tried to run the test suite with ninja test but it was unable to get past libs-global-KisSignalCompressorTest, is this a problem on master?
  • 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