Bug 390095 - Merging group layer with "inherit alpha" active results in empty layer
Summary: Merging group layer with "inherit alpha" active results in empty layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-02-08 19:06 UTC by kalia24
Modified: 2018-04-07 13:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
file to reproduce with. (75.60 KB, application/x-krita)
2018-02-08 19:12 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kalia24 2018-02-08 19:06:01 UTC
Steps:
1. Create document with partially-transparent base layer (#1).
2. Create group layer with at least one partially-transparent layer that overlaps #1 in it (#2).
3. Create another group layer, add #1 and #2 to it (with #2 on top), activate "Inherit alpha" in #2 (content of #2 gets cropped by content of #1 = correct).
4. Perform "Merge group" on #2 -> merged layer is empty (incorrect :P ).
Comment 1 Halla Rempt 2018-02-08 19:10:27 UTC
Hi Kalia!

Could you please check whether this is a regression from 3.3.3?

Thanks!
Comment 2 wolthera 2018-02-08 19:12:45 UTC
Created attachment 110446 [details]
file to reproduce with.

I can confirm, attachinga small file to reproduce with. Layer 2 needs to have "merge group" applied.
Comment 3 kalia24 2018-02-09 11:48:33 UTC
Hi Boudewijn!

The issue is present in 3.3.3 as well - when you flatten group layer with inherited alpha, it leaves empty layer.
Comment 4 Halla Rempt 2018-02-09 12:08:20 UTC
Thanks for checking!
Comment 5 Dmitry Kazakov 2018-04-03 15:00:31 UTC
Git commit 39cc9f9e115da66563712bf8ba5b941e9be0a85a by Dmitry Kazakov.
Committed on 03/04/2018 at 15:00.
Pushed by dkazakov into branch 'master'.

Fix flattening of group layers with Inherit Alpha property set

If all the selected layers have the same composite op and channel
flags we should just merge them together using Normal composition
and write into a destination layer with their original composition
and channel flags.

M  +56   -2    libs/image/kis_layer_utils.cpp

https://commits.kde.org/krita/39cc9f9e115da66563712bf8ba5b941e9be0a85a
Comment 6 Dmitry Kazakov 2018-04-07 13:44:50 UTC
Git commit 0e101cd875a5d86bc77406656c218fd94bc9a494 by Dmitry Kazakov.
Committed on 07/04/2018 at 13:28.
Pushed by dkazakov into branch 'krita/4.0'.

Fix flattening of group layers with Inherit Alpha property set

If all the selected layers have the same composite op and channel
flags we should just merge them together using Normal composition
and write into a destination layer with their original composition
and channel flags.

M  +56   -2    libs/image/kis_layer_utils.cpp

https://commits.kde.org/krita/0e101cd875a5d86bc77406656c218fd94bc9a494