Commit e5638451 authored by Ell's avatar Ell

Issue #2095 - Filter wavelet-decompose error with layer Group option active

In gimp_image_merge_layers(), explicitly fetch the graph of the top
layer's parent layer (if exists), to make sure that the top layer's
graph has a parent node.  We already fetch the image graph, which
takes care of top-level layers, however, if the top layer is a
child of an invisible layer group, as is the case in the wavelet-
decompose plug-in, this is not generally enough to guarantee that
the group's graph is constructed.
parent bcf9c943
......@@ -487,6 +487,14 @@ gimp_image_merge_layers (GimpImage *image,
(void) gimp_projectable_get_graph (GIMP_PROJECTABLE (image));
/* Make sure the parent's graph is constructed, so that the top layer has a
* parent node, even if it is the child of a group layer (in particular, of
* an invisible group layer, whose graph may not have been constructed as a
* result of the above call. see issue #2095.)
if (parent)
(void) gimp_filter_get_node (GIMP_FILTER (parent));
/* 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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment