Skip to content

Fix crash and some issues in Freehand Selection Tool

  • Fix crash when we start the selection in continued mode. Index out of bounds in updateContinuedMode. The index to the point before the last point was used instead of the index to the last point, which provoked a crash when there was only one point in the list (that happened when we started the selection in continued mode).
  • Fix deselecting the current selection when we are in continued mode and there is only one point. Prevent finishing the selection if there is only one point, since finishSelectionAction will deselect the current selection. That is fine if the user just clicks, but not if we are in continued mode.
  • Fix issues when we start a new selection in continuous mode after making a selection also in continuous mode with one point. The list of points was not cleared if it had only one point since finishSelectionAction returns early in that case. This leftover point provoked some issues when a new selection was made.

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.
Edited by Deif Lou

Merge request reports

Loading