diff --git a/app/paint/gimpclone.c b/app/paint/gimpclone.c index 24b32e187a..464a3a4ba4 100644 --- a/app/paint/gimpclone.c +++ b/app/paint/gimpclone.c @@ -27,6 +27,7 @@ #include "paint-types.h" +#include "gegl/gimp-gegl-apply-operation.h" #include "gegl/gimp-gegl-loops.h" #include "core/gimp.h" @@ -178,25 +179,11 @@ gimp_clone_motion (GimpSourceCore *source_core, GEGL_RECTANGLE (paint_area_offset_x, paint_area_offset_y, 0, 0)); + if (op) { - GeglNode *graph, *source, *target; - - graph = gegl_node_new (); - source = gegl_node_new_child (graph, - "operation", "gegl:buffer-source", - "buffer", paint_buffer, - NULL); - gegl_node_add_child (graph, op); - target = gegl_node_new_child (graph, - "operation", "gegl:write-buffer", - "buffer", paint_buffer, - NULL); - - gegl_node_link_many (source, op, target, NULL); - gegl_node_process (target); - - g_object_unref (graph); + gimp_gegl_apply_operation (paint_buffer, NULL, NULL, op, + paint_buffer, NULL, FALSE); } } else if (options->clone_type == GIMP_CLONE_PATTERN) diff --git a/app/paint/gimpheal.c b/app/paint/gimpheal.c index c4e9ada09d..2901df3315 100644 --- a/app/paint/gimpheal.c +++ b/app/paint/gimpheal.c @@ -32,6 +32,7 @@ #include "paint-types.h" +#include "gegl/gimp-gegl-apply-operation.h" #include "gegl/gimp-gegl-loops.h" #include "core/gimpbrush.h" @@ -611,23 +612,8 @@ gimp_heal_motion (GimpSourceCore *source_core, if (op) { - GeglNode *graph, *source, *target; - - graph = gegl_node_new (); - source = gegl_node_new_child (graph, - "operation", "gegl:buffer-source", - "buffer", src_copy, - NULL); - gegl_node_add_child (graph, op); - target = gegl_node_new_child (graph, - "operation", "gegl:write-buffer", - "buffer", src_copy, - NULL); - - gegl_node_link_many (source, op, target, NULL); - gegl_node_process (target); - - g_object_unref (graph); + gimp_gegl_apply_operation (src_copy, NULL, NULL, op, + src_copy, NULL, FALSE); } gimp_heal (src_copy,