Bug 347961

Summary: Clone tool doesn't work
Product: [Applications] krita Reporter: alkaris <shadwolf16>
Component: ToolsAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: normal CC: animtim, freebox64, guruguru.sp, halla
Priority: NOR    
Version: 2.9.4   
Target Milestone: ---   
Platform: Mint (Debian based)   
OS: Linux   
Latest Commit: Version Fixed In:

Description alkaris 2015-05-19 17:32:40 UTC
The Clone_tool in the brush selection doesn't function the way it use to or should be functioning anymore. I can't clone a source image from a different layer on to a new layer like normal, because it acts like nothing's been selected to clone from. The default way the Clone_tool worked was that I Ctrl+Click the source area I want to clone, and then make a new layer, to only find it's not painting a clone of the source image of the other layer to the new one. This worked in previous versions of Krita, but not in this one.

Reproducible: Always

Steps to Reproduce:
1. Select Clone_tool from Brushes
2. Pick image source you want to use for cloning.
3. Create a new layer and try to paint the source you selected.

Actual Results:  
Doesn't do anything, except on the layer of image source you cloned from to the new layer created for painting on to.

Expected Results:  
Expected results was to clone image source on one layer and carry over into new layer after selecting the area to clone from.
Comment 1 mvowada 2015-05-19 19:38:06 UTC
Yes. Even though actually, I can still clone from multiple layers, by checking: "(main menu) > Edit brush settings > Brush engines > Clone > General > Painting Mode > Clone From All Visible Layers".

A bit hidden... maybe an expedient could be to tie it with the similar option of the color dropper tool...
Comment 2 alkaris 2015-05-19 21:16:45 UTC
well that's rather annoying way to figure it out.
Comment 3 guruguru.sp 2015-06-20 12:29:22 UTC
Confirmed for me on Krita 2.9.5.1.
Pick image source from another layer for clone brush does not work.
Clone from all visible layers could be used as a workaround, but this looks like a function loss to me.
https://userbase.kde.org/Krita/Manual/BrushEngines/CloneBrush
Comment 4 animtim 2015-08-27 14:57:06 UTC
Yes I can confirm that Clone tool source is kinda broken.
What I can say:
-It always use the current layer as source, unlike what is said in the comments of the Painting mode section of the brush settings.

-Ctrl+Alt+click, which should set the source on another layer, doesn't set the source point at all.
Comment 5 Halla Rempt 2015-08-28 13:03:34 UTC
Okay, this was broken in 

commit 901bbf1abe2d7c119d78e2b0d69f5a49d5630d16
Author: Dmitry Kazakov <dimula73@gmail.com>
Date:   Fri Dec 26 17:50:29 2014 +0400
Follows: v2.8.90
Precedes: v2.8.91
Branches: <Expand>

    Remove the link to KisNode in KisPaintOpSettings
    
    The settings object is purely XML data so we shouldn't store a shared
    pointer there. It causes really subtle bugs related to the lifetime of
    the node in question.
    
    Now the node is passed to the PaontOp directly via constructor. And the
    options widget gets it directly from KisPaintOpBox.
    
    BUG:341847
Comment 6 Halla Rempt 2015-08-28 13:07:56 UTC
Looks like healing also got broken in that commit.
Comment 7 Halla Rempt 2015-08-28 13:13:52 UTC
Which means the bug has been present in all 2.9 releases :-(
Comment 8 Halla Rempt 2015-08-28 13:36:21 UTC
Git commit dff628ba69148d7e4f8740e9c7a739059bbc1dbb by Boudewijn Rempt.
Committed on 28/08/2015 at 13:35.
Pushed by rempt into branch 'calligra/2.9'.

M  +2    -2    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_option.h
M  +2    -2    krita/plugins/paintops/defaultpaintops/duplicate/wdgduplicateop.ui

http://commits.kde.org/calligra/dff628ba69148d7e4f8740e9c7a739059bbc1dbb
Comment 9 Halla Rempt 2015-08-28 13:38:21 UTC
Git commit 2ec4362bae464bf1e7664851a86b889f609e71d0 by Boudewijn Rempt.
Committed on 28/08/2015 at 13:38.
Pushed by rempt into branch 'calligra/2.9'.

We need the features back, though!

M  +1    -1    krita/plugins/paintops/defaultpaintops/duplicate/wdgduplicateop.ui

http://commits.kde.org/calligra/2ec4362bae464bf1e7664851a86b889f609e71d0
Comment 10 Dmitry Kazakov 2015-09-04 08:29:51 UTC
Git commit 0fd6a4802e8101be872393113ad6891596813354 by Dmitry Kazakov.
Committed on 04/09/2015 at 08:27.
Pushed by dkazakov into branch 'calligra/2.9'.

Fix Clone Tool when picking from a different layer

More than that, you can pick your source from a
different image opened in Krita even! :)

M  +2    -1    krita/image/brushengine/kis_paintop_settings.cpp
M  +1    -1    krita/image/brushengine/kis_paintop_settings.h
M  +11   -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp
M  +6    -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp
M  +4    -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.h
M  +2    -1    krita/ui/tool/kis_tool_freehand.cc

http://commits.kde.org/calligra/0fd6a4802e8101be872393113ad6891596813354
Comment 11 Dmitry Kazakov 2015-09-04 09:09:09 UTC
Git commit 6cc4527d380efc97e10f3f69df738f52752bb806 by Dmitry Kazakov.
Committed on 04/09/2015 at 09:08.
Pushed by dkazakov into branch 'calligra/2.9'.

Implement Ctrl+Alt-click action for Duplicate Brush

Ctrl+Click picks the source from the *currently active* layer
Ctrl+Alt+Click picks the source from layer that was *used before* (in
               the latest Ctrl+Click).

M  +4    -2    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp
M  +1    -1    krita/plugins/paintops/defaultpaintops/duplicate/wdgduplicateop.ui

http://commits.kde.org/calligra/6cc4527d380efc97e10f3f69df738f52752bb806
Comment 12 Halla Rempt 2015-09-04 09:12:46 UTC
Git commit 3a90b57b7be7e266c3f97f2e35d7d7cdb9122a77 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 04/09/2015 at 09:12.
Pushed by rempt into branch 'master'.

Fix Clone Tool when picking from a different layer

More than that, you can pick your source from a
different image opened in Krita even! :)

M  +2    -1    krita/image/brushengine/kis_paintop_settings.cpp
M  +1    -1    krita/image/brushengine/kis_paintop_settings.h
M  +11   -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp
M  +6    -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp
M  +4    -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.h
M  +2    -1    krita/ui/tool/kis_tool_freehand.cc

http://commits.kde.org/calligra/3a90b57b7be7e266c3f97f2e35d7d7cdb9122a77
Comment 13 Halla Rempt 2015-09-04 09:12:46 UTC
Git commit 6528911b6d3a78214bfecc0e7ef8c8167abeea51 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 04/09/2015 at 09:12.
Pushed by rempt into branch 'master'.

Implement Ctrl+Alt-click action for Duplicate Brush

Ctrl+Click picks the source from the *currently active* layer
Ctrl+Alt+Click picks the source from layer that was *used before* (in
               the latest Ctrl+Click).

M  +4    -2    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp
M  +1    -1    krita/plugins/paintops/defaultpaintops/duplicate/wdgduplicateop.ui

http://commits.kde.org/calligra/6528911b6d3a78214bfecc0e7ef8c8167abeea51
Comment 14 Dmitry Kazakov 2015-09-04 13:02:04 UTC
Git commit 34b87824c0421dce60551db8aa6f408571e9c602 by Dmitry Kazakov.
Committed on 04/09/2015 at 08:30.
Pushed by dkazakov into branch 'krita-animation-pentikainen'.

Fix Clone Tool when picking from a different layer

More than that, you can pick your source from a
different image opened in Krita even! :)

M  +2    -1    krita/image/brushengine/kis_paintop_settings.cpp
M  +1    -1    krita/image/brushengine/kis_paintop_settings.h
M  +11   -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp
M  +6    -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp
M  +4    -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.h
M  +2    -1    krita/ui/tool/kis_tool_freehand.cc

http://commits.kde.org/calligra/34b87824c0421dce60551db8aa6f408571e9c602
Comment 15 Dmitry Kazakov 2015-09-04 13:02:04 UTC
Git commit 628c61badbc6c95f36e8b993ac667957bd2b78f0 by Dmitry Kazakov.
Committed on 04/09/2015 at 09:10.
Pushed by dkazakov into branch 'krita-animation-pentikainen'.

Implement Ctrl+Alt-click action for Duplicate Brush

Ctrl+Click picks the source from the *currently active* layer
Ctrl+Alt+Click picks the source from layer that was *used before* (in
               the latest Ctrl+Click).

M  +4    -2    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp
M  +1    -1    krita/plugins/paintops/defaultpaintops/duplicate/wdgduplicateop.ui

http://commits.kde.org/calligra/628c61badbc6c95f36e8b993ac667957bd2b78f0