Bug 456382

Summary: Dropping Reference Images in outside of the canvas aren't placed at the event position
Product: [Applications] krita Reporter: kousakiaya
Component: Tools/Reference ImagesAssignee: amyspark <amy>
Status: RESOLVED FIXED    
Severity: normal CC: halla, kousakiaya, mangatengu
Priority: NOR Keywords: regression, release_blocker
Version: 5.1.0-beta1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Recording on 5.1.0 - beta2 (git b1979a3)

Description kousakiaya 2022-07-06 06:01:44 UTC
SUMMARY
After drop-in, Reference Images appears at semi-random location.
 

STEPS TO REPRODUCE
1. have some references
2. drop in them
3. try to find them with zoom out/in

OBSERVED RESULT
You find them in some corner (bad luck) or other visible places but not the exact location where the drop-in menu is invoked.

EXPECTED RESULT
The should appear right under the drop-in location as in the 5.06 release.

SOFTWARE/OS VERSIONS
Windows: 5.10 beta 1
Comment 1 Halla Rempt 2022-07-06 08:15:39 UTC
Huh, d&d of external images as reference images is completely broken for me. Amyspark, please take a look.
Comment 2 amyspark 2022-07-06 13:00:13 UTC
Git commit 54ea66f4603035e555181e66d67f0a6d0a3268a3 by L. E. Segovia.
Committed on 06/07/2022 at 12:59.
Pushed by lsegovia into branch 'master'.

KisClipboard: fix typo in default source selection

M  +9    -1    libs/ui/kis_clipboard.h

https://invent.kde.org/graphics/krita/commit/54ea66f4603035e555181e66d67f0a6d0a3268a3
Comment 3 amyspark 2022-07-06 13:00:44 UTC
Git commit 683fd6b90bcb6981692ef97ca32e22612fea7661 by L. E. Segovia.
Committed on 06/07/2022 at 13:00.
Pushed by lsegovia into branch 'krita/5.1'.

KisClipboard: fix typo in default source selection
(cherry picked from commit 54ea66f4603035e555181e66d67f0a6d0a3268a3)

M  +9    -1    libs/ui/kis_clipboard.h

https://invent.kde.org/graphics/krita/commit/683fd6b90bcb6981692ef97ca32e22612fea7661
Comment 4 amyspark 2022-07-07 12:56:32 UTC
*** Bug 456445 has been marked as a duplicate of this bug. ***
Comment 5 Halla Rempt 2022-07-14 08:14:34 UTC
Yes, d&d of reference images now works, but the original report is still valid: the reference images are placed at semi-random locations.
Comment 6 amyspark 2022-07-14 15:44:22 UTC
Ack, will look into it after I finish reviewing Dmitry's PR.
Comment 7 amyspark 2022-07-14 21:42:35 UTC
Couldn't reproduce with master branch (commit a40c36155f919d0405c8891774b0bc8c07494356, MSVC) or 5.1.0-beta2 (the latest nightly available, b24a532) on Windows 10. Dragging and dropping references works correctly in both cases.
Comment 8 kousakiaya 2022-07-18 08:23:31 UTC
Created attachment 150699 [details]
Recording on 5.1.0 - beta2 (git b1979a3)

can reproduce on 5.1.0 - beta2 (git b1979a3) (Krita Plus nighly)
Comment 9 amyspark 2022-07-18 11:44:18 UTC
According to the video, you're dropping the images *outside* of the canvas. I'll have to check (once I have my work station back) how we're placing them in this case.

In the meanwhile, reopening.
Comment 10 amyspark 2022-07-19 15:12:02 UTC
Git commit 1426f9b90d03dc1bb9c3dd86261606347ad93a46 by L. E. Segovia.
Committed on 19/07/2022 at 15:07.
Pushed by lsegovia into branch 'master'.

Fix positioning when pasting multiple reference images

This commit partially reverts commit 7758ade706e7b1c2163d4f9ce7216095794b872c.

M  +1    -1    libs/ui/KisView.cpp

https://invent.kde.org/graphics/krita/commit/1426f9b90d03dc1bb9c3dd86261606347ad93a46
Comment 11 amyspark 2022-07-19 15:12:28 UTC
Git commit d3e9097bfc6d2bd088a818bcf398bd383263ce58 by L. E. Segovia.
Committed on 19/07/2022 at 15:12.
Pushed by lsegovia into branch 'krita/5.1'.

Fix positioning when pasting multiple reference images

This commit partially reverts commit 7758ade706e7b1c2163d4f9ce7216095794b872c.
(cherry picked from commit 1426f9b90d03dc1bb9c3dd86261606347ad93a46)

M  +1    -1    libs/ui/KisView.cpp

https://invent.kde.org/graphics/krita/commit/d3e9097bfc6d2bd088a818bcf398bd383263ce58