Bug 290380

Summary: Removing the source of the clone layer leaves the clone in hazardous state
Product: [Applications] krita Reporter: Dmitry Kazakov <dimula73>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dmitry Kazakov 2012-01-02 11:05:32 UTC
1) Create a layer
2) Create a clone of this layer
3) Remove the source layer

Clone layer still has a projection of the source due to some shared pointer links

4) Save the image to .kra file
5) Open saved .kra image

Crash, because the clone is not initialized
Comment 1 Dmitry Kazakov 2012-02-06 06:39:53 UTC
Git commit 64bea43ed6cecbe383f560c63909cd63984a4123 by Dmitry Kazakov.
Committed on 06/02/2012 at 08:38.
Pushed by dkazakov into branch 'shapes-as-node-model-kazakov'.

Fixed removing a layer that has clones

Now all the clones reincarnate to usual paint layers so will even be
able to paint on them.

M  +57   -9    krita/image/commands/kis_image_layer_remove_command.cpp
M  +15   -6    krita/image/commands/kis_image_layer_remove_command.h
M  +12   -0    krita/image/kis_clone_layer.cpp
M  +8    -0    krita/image/kis_clone_layer.h
M  +37   -0    krita/image/tests/kis_clone_layer_test.cpp
M  +2    -0    krita/image/tests/kis_clone_layer_test.h

http://commits.kde.org/calligra/64bea43ed6cecbe383f560c63909cd63984a4123