mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
13b640f84c
commit
b4c7dd8fd8
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue