Skip to content

Python Scratchpad API fixes

Scott Petrovic requested to merge (removed):petrovic/scratchpad-api-fix into master

scratchpad-docker

This is some additions and fixes to my previous Scratchpad Python API. I made a plugin for it, so noticed some issues when actually trying to use the API in a docker.

  1. Disable painting on the scratchpad widget if there is no canvas
  2. Fixed a crash when "manual mode" was set to false

After talking with Dmitry I have also done a few things

  • Moved the Scratchpad API to the Document class. There were talks on KA of future functionality saving scratchpad data to the KRA file
  • Currently in Krita, when you zoom the canvas, it also zooms the scratchpad. You can disable that zoom linkage between scratchpad and canvas. It is off by default.

Test Plan

Get plugin (v2): scratchpad.zip

Load the Scratchpad python plugin. It should load ok and be a docker. In terms of saving/loading, it just saves and loads a PNG file to your hard drive. If you have no documents open, the docker should be disabled and not allow you to paint on it.

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 Scott Petrovic

Merge request reports