Bug 351577

Summary: Merging below into a layer that clone layers depend on, de-clones the layers
Product: [Applications] krita Reporter: Sean Givan <kinsman.nb.ca>
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: halla, nballman2012
Priority: NOR    
Version: 2.9.6   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sean Givan 2015-08-21 17:16:36 UTC
If you use the command 'Merge with Layer Below', and the layer below is a layer that clone layers use as a source, the clone layers will not update, and also become ordinary layers.

Reproducible: Always

Steps to Reproduce:
1. Create a layer 'Source'.
2. Clone this layer, name it 'Clone'.
3. Either:
3a. Create a layer above 'Source' and use 'Merge with Layer Below' to combine the two.
3b. Copy and Paste something inside 'Source', and then merge the pasted layer back into 'Source'.
Comment 1 Nicole 2015-08-23 19:42:10 UTC
I was able to reproduce this error. However, I am unsure if this behavior of the program is unexpected. For example, a vector layer merged with an ordinary layer will become an ordinary layer. Same with group and vector layers. 

Perhaps instead of immediately merging and becoming an ordinary layer, the program could prompt the user, letting them know the layer will lose its special properties.
Comment 2 Sean Givan 2015-08-24 21:06:38 UTC
I can understand a special layer being merged with an ordinary layer becoming ordinary, but clone layers are a third party to the merging - and since the output layer in a merge carries the same name as the bottom layer, the clone layer wouldn't have lost its link, so I would expect that the clone layer should simply update to match the source's new contents.

Here's the use case where I found the bug:

I was creating panels for thumbnail sketching. My base layer had white squares with black borders, and further layers used alpha inheriting so that my lines would stay inside the squares. I could still draw over the panel borders themselves, so I had a clone layer on top; it used the layer with my panels as a source, and was set to blend mode Multiply, so that the panels' black lines would be reinforced.

When I wanted more panels, I used copy and paste on my source layer to create them. But when I did this, and merged my paste layer back into the source layer, I needed to recreate my clone layer.
Comment 3 Halla Rempt 2015-08-25 08:22:55 UTC
Hi Sean,

It's not really easy :-). Merging two layers together creates a new layer, so the original clone source layer gets deleted and its clonees detached. Right now, this is the intended behaviour, but I agree that it would be better to set the clone source of all clonees to the newly created layer, though, so I'm confirming the issue. I cannot promise we'll be able to quickly implement the new behaviour, though.
Comment 4 Halla Rempt 2016-01-24 14:25:29 UTC
WISHGROUP: Out of scope

I'm sorry, but we won't be doing this -- it doesn't mesh with the way our layer stack works. You can remove the ex-clone and make a new clone.