[gimp/gimp-2-10] app: don't let image component mask affect channel colors



commit ee3c6a932356d7ce5bf0d773d12d59ccf74c4a1c
Author: Ell <ell_se yahoo com>
Date:   Sun Nov 4 13:18:08 2018 -0500

    app: don't let image component mask affect channel colors
    
    Connect GimpImage's gimp:mask-components node to the layers node
    *before* connecting the channels node, so that the image's
    component mask doesn't affect the channel colors, as is the case in
    2.8.
    
    (cherry picked from commit 56920dcdbfc2cf7cfd72f1ec1438f8fe46e3da7b)

 app/core/gimpimage.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index be65863efb..167f5e2646 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1563,14 +1563,6 @@ gimp_image_get_graph (GimpProjectable *projectable)
 
   gegl_node_add_child (private->graph, layers_node);
 
-  channels_node =
-    gimp_filter_stack_get_graph (GIMP_FILTER_STACK (private->channels->container));
-
-  gegl_node_add_child (private->graph, channels_node);
-
-  gegl_node_connect_to (layers_node,   "output",
-                        channels_node, "input");
-
   mask = ~gimp_image_get_visible_mask (image) & GIMP_COMPONENT_MASK_ALL;
 
   private->visible_mask =
@@ -1579,13 +1571,21 @@ gimp_image_get_graph (GimpProjectable *projectable)
                          "mask",      mask,
                          NULL);
 
-  gegl_node_connect_to (channels_node,         "output",
+  gegl_node_connect_to (layers_node,           "output",
                         private->visible_mask, "input");
 
-  output = gegl_node_get_output_proxy (private->graph, "output");
+  channels_node =
+    gimp_filter_stack_get_graph (GIMP_FILTER_STACK (private->channels->container));
+
+  gegl_node_add_child (private->graph, channels_node);
 
   gegl_node_connect_to (private->visible_mask, "output",
-                        output,                "input");
+                        channels_node,         "input");
+
+  output = gegl_node_get_output_proxy (private->graph, "output");
+
+  gegl_node_connect_to (channels_node, "output",
+                        output,        "input");
 
   return private->graph;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]