Diffusion Krita d9883ead2f84

Fix reference images being lost when image is cloned/flattened

Authored by dkazakov on Sep 2 2019, 12:00 PM.

Description

Fix reference images being lost when image is cloned/flattened

We shouldn't store a reference layer pointer in the document,
instead, we should fetch it from the image dynamically.

We should also ensure that fake layers are kept in the tree when
the image is flattened.

Details