[gimp/gimp-2-10] app: fix layer group effective mode for different mask modes
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: fix layer group effective mode for different mask modes
- Date: Fri, 21 Feb 2020 20:58:44 +0000 (UTC)
commit 3e9276eae7821e2eb942c17d8e6c31ca74dd1a9c
Author: Ell <ell_se yahoo com>
Date: Fri Feb 21 22:26:47 2020 +0200
app: fix layer group effective mode for different mask modes
In gimp_group_layer_get_effective_mode(), don't take the mask into
account if GimpLayer::apply-mask is FALSE.
(cherry picked from commit 8c81c6e1539d0729a218b2e729c295ee27e1c1a7)
app/core/gimpgrouplayer.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index 484f705457..6f57097636 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -1178,8 +1178,6 @@ gimp_group_layer_mask_changed (GimpLayer *layer)
g_warn_if_fail (GET_PRIVATE (layer)->suspend_mask == 0);
- gimp_layer_update_effective_mode (layer);
-
/* if we've already computed a bounding box, update it now, since the mask
* limits the bounding box to the group's size. if we haven't computed a
* bounding box yet we can skip this, and, in fact, we have to, or else the
@@ -1222,7 +1220,8 @@ gimp_group_layer_get_effective_mode (GimpLayer *layer,
*
* - and,
*
- * - the group's opacity is 100%, and it has no mask; or,
+ * - the group's opacity is 100%, and it has no mask (or the mask
+ * isn't applied); or,
*
* - the group's composite space equals the active children's
* composite space.
@@ -1297,9 +1296,14 @@ gimp_group_layer_get_effective_mode (GimpLayer *layer,
if (reduce)
{
+ gboolean has_mask;
+
+ has_mask = gimp_layer_get_mask (layer) &&
+ gimp_layer_get_apply_mask (layer);
+
if (first ||
(gimp_layer_get_opacity (layer) == GIMP_OPACITY_OPAQUE &&
- ! gimp_layer_get_mask (layer)) ||
+ ! has_mask) ||
*composite_space == gimp_layer_get_real_composite_space (layer))
{
/* strength reduction succeeded! */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]