mirror of https://github.com/GNOME/gimp.git
app: fix double node insertion to a graphless filter stack
When adding an item to a filter stack that doesn't have a graph yet, calling gimp_filter_stack_update_last_node() may ultimately lead to the invocation of gimp_filter_stack_get_graph(), which would create a new graph, and add the item's node to it; gimp_filter_stack_add() would then erroneously attempt to re-add the node to the graph. Fix this by calling gimp_filter_stack_update_last_node() after (potentially) adding the node to the graph in gimp_filter_stack_add().
This commit is contained in:
parent
064c4527cb
commit
1b0966d964
|
@ -114,13 +114,13 @@ gimp_filter_stack_add (GimpContainer *container,
|
|||
|
||||
GIMP_CONTAINER_CLASS (parent_class)->add (container, object);
|
||||
|
||||
gimp_filter_stack_update_last_node (stack);
|
||||
|
||||
if (stack->graph)
|
||||
{
|
||||
gegl_node_add_child (stack->graph, gimp_filter_get_node (filter));
|
||||
gimp_filter_stack_add_node (stack, filter);
|
||||
}
|
||||
|
||||
gimp_filter_stack_update_last_node (stack);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue