Skip to content

Enhancements in reference image tool, optimized loading of images from clipboard

BUG : 408445

  • Add support for multi mime-type clipboard for pasting reference images
  • Add "Paste as Reference Image" menu item and shortcut (Ctrl+Shift+R)
  • Make Paste from clipboard button on the reference tool dock always enabled and just do nothing upon unsuccessful image decoding (instead of showing error).
  • Optimized image loading from clipboard

Test Plan

  • Test if there is "Edit"->"Paste as Reference Image" menu item. It should be enabled and disabled depending on document is open or not
  • Pressing the "Edit"->"Paste as Reference Image" menu item as well as Shortcut "Ctrl+Shift+R" are works when image in clipboard persists. No error shown when pasting and some other kind, e.g. a text in clipboard
  • Test if pasting reference images from browser works
  • Test if general pasting images (from browser as well) works

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