Bug 290380 - Removing the source of the clone layer leaves the clone in hazardous state
Summary: Removing the source of the clone layer leaves the clone in hazardous state
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-02 11:05 UTC by Dmitry Kazakov
Modified: 2012-02-06 06:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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