Bug 452898 - Unexpected paste behaviour in reference image tool
Summary: Unexpected paste behaviour in reference image tool
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Reference Images (other bugs)
Version First Reported In: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-23 08:40 UTC by Alvin Wong
Modified: 2022-04-28 15:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2022-04-23 08:40:28 UTC
1. Activate reference image tool
2. Copy an image from Chrome
3. Paste it into Krita using Ctrl+V
4. The "Multiple Paste Sources Detected" dialog pops up:
4a. If you choose any options to paste the image, it gets pasted as a paint later.
4b. If you choose cancel or close the dialog, the image gets pasted as a reference image.

If you right click on the canvas to invoke the "Reference Image Actions" menu and choose "Paste". the reference image is simply pasted without any dialogs. Same for the Paste button in the tool options.

(Nightly f665ca6c0a)
Comment 1 amyspark 2022-04-24 00:33:39 UTC
Confirming on commit eeec8af100 with Vivaldi 5.1.2567.57 (Stable channel) (64 bits) .
Comment 2 amyspark 2022-04-24 00:48:28 UTC
CC'ing Dmitry because this arises from https://invent.kde.org/graphics/krita/-/commit/d57f22c09f6797938f34c9048ee97ad2d25bc8e6.

In short, when KisClipboard returns a void image, as chosen in the colour profile/multiple source dialogs, the paste factory retries the action invoking the associated handler from the currently selected tool. This doesn't look correct, but seems necessary to handle Inkscape SVG shapes.

Dmitry, can you have a look at this?
Comment 3 amyspark 2022-04-24 00:52:37 UTC
Marking as WAITINGFORINFO till we hear from Dmitry.
Comment 4 amyspark 2022-04-28 15:27:28 UTC
Git commit 41c8abcd6d3ee4eab492c0f10d0a0b38a5158c30 by L. E. Segovia.
Committed on 28/04/2022 at 14:06.
Pushed by lsegovia into branch 'master'.

Ensure the main paste handler is executed only when there's no tool handler available

M  +9    -3    libs/ui/actions/KisPasteActionFactories.cpp

https://invent.kde.org/graphics/krita/commit/41c8abcd6d3ee4eab492c0f10d0a0b38a5158c30