Bug 385853 - convert layer to selection mask when there's only one painting layer causes the program stuck
Summary: convert layer to selection mask when there's only one painting layer causes t...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.1.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-17 12:50 UTC by ty
Modified: 2019-06-19 13:34 UTC (History)
4 users (show)

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 ty 2017-10-17 12:50:38 UTC
doing so will cause adding layer or painting impossible,you have to close the current project,but what is on the canvas can still be exported to images
Comment 1 Halla Rempt 2017-11-21 15:06:51 UTC
I can confirm the issue. The problem is, there are no layers anymore. The conversion code should check whether there is more than one layer before converting.
Comment 2 mvowada 2018-01-20 17:27:07 UTC
(I can confirm on Ubuntu 14.04 - Krita 4.0.0-beta1.1.appimage)
Comment 3 mvowada 2018-08-30 07:14:57 UTC
"Undo (CTRL+Z)" should help to restore the "Layers" docker.
Comment 4 Julian Steinmann 2018-08-30 16:25:33 UTC
I can also confirm this issue with Krita 4.1.1, and as mvowada said "Undo (Ctrl+Z)" does restore everything correctly.
Comment 5 Tiar 2019-06-19 13:34:47 UTC
Git commit 0355e1abe8815db61046d050936ca8915c31ee52 by Agata Cacko.
Committed on 19/06/2019 at 13:34.
Pushed by tymond into branch 'master'.

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.

M  +2    -1    libs/ui/kis_mask_manager.cc

https://invent.kde.org/kde/krita/commit/0355e1abe8815db61046d050936ca8915c31ee52