Skip to content

Save and load assistant side handles in .kra and .paintingassistant files

Assistants can have side handles, but only the Vanishing Point assistant actually uses them. Since its side handles didn't get saved, they were initialized into a default position whenever a Vanishing Point assistant got loaded.

This change makes it so that side handles get saved and loaded, so the position of side handles can be preserved between sessions.

Test Plan

To test saving and loading side handles:

  1. In a new document, create a VP assistant and modify its side handles
  2. Save assistant into .paintingassistant file and then save .kra file
  3. Open .kra and load .paintingassistant file in a new document

Confirm that the VP assistant in both documents loaded the side handles that were modified in step 1.

To test loading when there is no side handles:

  1. With stable krita version, create VP assistant in new document
  2. Save .paintingassistant file and .kra file
  3. Open .kra and .paintingassitant file in krita build with this patch

Confirm that VP assistants are created with side handles in default position

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