Commit e269a837 authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

Issue #266 - Healing Tool - Sample Merged option does not work

gimp_heal_motion(): when sample merged is active, simply initialize
the paint buffer from the projection instead of the drawable.
parent 8dbd10b3
...@@ -511,17 +511,21 @@ gimp_heal_motion (GimpSourceCore *source_core, ...@@ -511,17 +511,21 @@ gimp_heal_motion (GimpSourceCore *source_core,
gint paint_area_width, gint paint_area_width,
gint paint_area_height) gint paint_area_height)
{ {
GimpPaintCore *paint_core = GIMP_PAINT_CORE (source_core); GimpPaintCore *paint_core = GIMP_PAINT_CORE (source_core);
GimpContext *context = GIMP_CONTEXT (paint_options); GimpContext *context = GIMP_CONTEXT (paint_options);
GimpDynamics *dynamics = GIMP_BRUSH_CORE (paint_core)->dynamics; GimpSourceOptions *src_options = GIMP_SOURCE_OPTIONS (paint_options);
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable)); GimpDynamics *dynamics = GIMP_BRUSH_CORE (paint_core)->dynamics;
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GeglBuffer *src_copy; GeglBuffer *src_copy;
GeglBuffer *mask_buffer; GeglBuffer *mask_buffer;
GimpPickable *dest_pickable;
const GimpTempBuf *mask_buf; const GimpTempBuf *mask_buf;
gdouble fade_point; gdouble fade_point;
gdouble force; gdouble force;
gint mask_off_x; gint mask_off_x;
gint mask_off_y; gint mask_off_y;
gint dest_pickable_off_x;
gint dest_pickable_off_y;
fade_point = gimp_paint_options_get_fade (paint_options, image, fade_point = gimp_paint_options_get_fade (paint_options, image,
paint_core->pixel_dist); paint_core->pixel_dist);
...@@ -566,8 +570,25 @@ gimp_heal_motion (GimpSourceCore *source_core, ...@@ -566,8 +570,25 @@ gimp_heal_motion (GimpSourceCore *source_core,
src_rect->width, src_rect->width,
src_rect->height)); src_rect->height));
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable), if (src_options->sample_merged)
GEGL_RECTANGLE (paint_buffer_x, paint_buffer_y, {
dest_pickable = GIMP_PICKABLE (image);
gimp_item_get_offset (GIMP_ITEM (drawable),
dest_pickable = GIMP_PICKABLE (drawable);
dest_pickable_off_x = 0;
dest_pickable_off_y = 0;
gimp_gegl_buffer_copy (gimp_pickable_get_buffer (dest_pickable),
GEGL_RECTANGLE (paint_buffer_x + dest_pickable_off_x,
paint_buffer_y + dest_pickable_off_y,
gegl_buffer_get_width (paint_buffer), gegl_buffer_get_width (paint_buffer),
gegl_buffer_get_height (paint_buffer)), gegl_buffer_get_height (paint_buffer)),
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