Diffusion Krita 0355e1abe881

Fix converting lonely layer to selection mask

Authored by tymond on Jun 19 2019, 1:15 PM.

Description

Fix converting lonely layer to selection mask

When you have only one layer in the image, you can still convert it
into a mask: filter mask, selection mask or transparency mask.
In case of filter and transparency masks, a new layer was created.
Before this commit, converting to selection mask caused Krita to enter
a state where there was no layers in Layers docker.
This commit makes sure that converting a lonely layer into a selection
mask will trigger creating new layer as well.

Note that the added check is important because the root layer allows
selection mask to be its child because of Global Selection Mask (that
was also the reason why only the selection mask worked the way it
worked) - that's why Krita needs to check the parent node explicitely
for being a root.

BUG:385853

Details

Committed
tymondJun 19 2019, 1:34 PM
Parents
R37:b30b3b89d84f: Fix a crash when creating snapshot with no open document
Branches
Unknown
Tags
Unknown