Fix copy/paste frames to clipboard
I inadvertedly worked on the same bug as thie other merge request https://invent.kde.org/kde/krita/merge_requests/16 (two bugs open with descriptions very different :/ ) the difference is I used a reference uuid to find the source image to copy data from. Which in turn makes it not copy if the original source is closed. However it is very fast and works across multiple krita windows instances and types.
@ashwind fix is better in retaining data if original document is closed, but if the animation frames/file is too large it is slow on same image copy/paste/move frames operations. He expressed he might not be able to finish his patch, that's why I send this for review. However I still don't want to throw his work to waste.
Fixes bugs
What is done exactly
On save we use current image->root() node uuid to add to ClipboardMimeData
On drop operation we look for the saved image->root() uuid in all open documents, if found we copy the frames data, else we KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE
return false.
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.