Skip to content

Bugfix: Crop tool doesn't respond to some events

Sharaf Zaman requested to merge szaman/krita:bug-435201-crop-tool into master

When performing a redo we receive a signal in KisToolCrop::requestStrokeEnd. To prevent a crash we have to detect if the action user performed should end the stroke or cancel it (for redo). This is same as handling requestUndoDuringStroke but on the opposite action.

AFAIK there are/should be no side effects of this. This does however cost an almost full rebuild (!!) and is an API change for a seemingly simple thing :(

Test Plan

  1. Cropping using 'Enter' Key should world
  2. Redoing a crop while selection is active shouldn't crash Krita

BUG:435201,433770

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