[gimp] app: run gimp_projectable_get_graph() before gegl_node_get_parent()...



commit b4c7dd8fd809b817a6e24c7f8d8a57003017146d
Author: Jehan <jehan girinstud io>
Date:   Mon Jan 22 15:35:22 2018 +0100

    app: run gimp_projectable_get_graph() before gegl_node_get_parent()...
    
    ... on top-level layers.
    There was even a comment for this, but I missed this when I moved some
    code to the top of the function in commit b9577a783d. Now moving this
    call up as well. This appeared to be more of a problem when merging
    layers without a GUI (script-fu). I'm guessing the GUI calls this anyway
    before.

 app/core/gimpimage-merge.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c
index 7be33ca..b65ff0a 100644
--- a/app/core/gimpimage-merge.c
+++ b/app/core/gimpimage-merge.c
@@ -459,6 +459,11 @@ gimp_image_merge_layers (GimpImage     *image,
   top_layer = merge_list->data;
   parent    = gimp_layer_get_parent (top_layer);
 
+  /*  Make sure the image's graph is constructed, so that top-level layers have
+   *  a parent node.
+   */
+  (void) gimp_projectable_get_graph (GIMP_PROJECTABLE (image));
+
   /*  Build our graph inside the top-layer's parent node  */
   source_node = gimp_filter_get_node (GIMP_FILTER (top_layer));
   node = gegl_node_get_parent (source_node);
@@ -597,11 +602,6 @@ gimp_image_merge_layers (GimpImage     *image,
 
   gimp_item_set_offset (GIMP_ITEM (merge_layer), x1, y1);
 
-  /*  Make sure the image's graph is constructed, so that top-level layers have
-   *  a parent node.
-   */
-  (void) gimp_projectable_get_graph (GIMP_PROJECTABLE (image));
-
   offset_node = gegl_node_new_child (node,
                                      "operation", "gegl:translate",
                                      "x",         (gdouble) -x1,


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