Bug 349077

Summary: Moving a group with clone layers does not update offset correctly
Product: [Applications] krita Reporter: magnamara69
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bartosz.styperek, halla, krita
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Visual of reproduction steps.

Description magnamara69 2015-06-12 20:39:02 UTC
This was observed on a group layer with a paint layer and its clone layer, moving the group layer updates the position of the paint layer and adds to the offset in the direction of movement, breaking the constant distance between them.

Also, turning on pass-through on the group layer prevents updating of the clone layer offset.

Reproducible: Always

Steps to Reproduce:
1.add group layer
2.add paint layer to group layer
3.add clone of paint layer to group layer
4.use move layer tool to move group layer
5.enable pass through
6.use move layer tool to move group layer

Actual Results:  
Desynchronization of paint and clone layers.

Expected Results:  
Paint and clone layers moving in parallel, with the distance constant.
Comment 1 Halla Rempt 2015-06-20 07:44:10 UTC
Hi,

Thanks for the report. I can reproduce the issue. Dmitry, can you put this on your todo?
Comment 2 bartosz.styperek 2015-10-09 20:48:22 UTC
I got problem, when moving layer, which is inside group. The movement layer is not updated, unless I turn it's visibility on/off. This happens only when group has transparency layer. When disabled, it work ok. Work ok in pass through mode too.
Comment 3 Kyle UX (chez Tinderbox) 2015-11-22 19:22:18 UTC
Additional Transformation Issue with Clone Layers within Group Layers

1. Create a Group Layer
2. Make a Paint Layer and draw 1 circle and add a directional marker to it.
3. Clone the Paint Layer and offset it to the right.
4. Create a new Paint Layer at the top of the Group and paint over both circles in red to mark their positions.
5. Select the Group Layer
6. Use Transform a Layer [Ctrl + T] then shrink and rotate the layer the folder.
7. The scaling data is preserved, but neither position, nor rotation, offset data is saved.
Comment 4 Kyle UX (chez Tinderbox) 2015-11-22 19:24:40 UTC
Created attachment 95656 [details]
Visual of reproduction steps.
Comment 5 Dmitry Kazakov 2016-04-05 13:58:15 UTC
Git commit d7b9b2e99ad68bf14a8083d6078b238483e5d55f by Dmitry Kazakov.
Committed on 05/04/2016 at 13:57.
Pushed by dkazakov into branch 'master'.

Fix moving Clone layers as a part of group layer

Basically we just filter-out clone layers, whose source is already in
the list of processed layers. We do this filtering in two ways:

1) By simple filtering out m_nodes
2) By adding child clones into the blacklist, which is handled by the
   recursive function calls inside

Ref T2082

M  +47   -0    libs/image/kis_layer_utils.cpp
M  +20   -0    libs/image/kis_layer_utils.h
M  +49   -30   plugins/tools/basictools/strokes/move_stroke_strategy.cpp
M  +1    -0    plugins/tools/basictools/strokes/move_stroke_strategy.h

http://commits.kde.org/krita/d7b9b2e99ad68bf14a8083d6078b238483e5d55f