[gimp] Bug 773960 - smudge tool not working in tiling symmetry.



commit 4a0653e12d4ea08f1cd18903855762d543e29a07
Author: Jehan <jehan girinstud io>
Date:   Sun Nov 6 17:10:28 2016 +0100

    Bug 773960 - smudge tool not working in tiling symmetry.
    
    Initialization was failing when a paint buffer could not be returned for
    a stroke (which was bound to happen in tiling). Instead it must just
    ignore the coordinates which won't result in painting, and continue to
    the next ones.

 app/paint/gimpsmudge.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/app/paint/gimpsmudge.c b/app/paint/gimpsmudge.c
index 397132b..3999032 100644
--- a/app/paint/gimpsmudge.c
+++ b/app/paint/gimpsmudge.c
@@ -197,13 +197,6 @@ gimp_smudge_start (GimpPaintCore    *paint_core,
       GeglBuffer *accum_buffer;
 
       coords = gimp_symmetry_get_coords (sym, i);
-      paint_buffer = gimp_paint_core_get_paint_buffer (paint_core, drawable,
-                                                       paint_options, coords,
-                                                       &paint_buffer_x,
-                                                       &paint_buffer_y,
-                                                       NULL, NULL);
-      if (! paint_buffer)
-        return FALSE;
 
       gimp_smudge_accumulator_size (paint_options, coords, &accum_size);
 
@@ -218,7 +211,15 @@ gimp_smudge_start (GimpPaintCore    *paint_core,
       /*  adjust the x and y coordinates to the upper left corner of the
        *  accumulator
        */
-      gimp_smudge_accumulator_coords (paint_core, coords, i, &x, &y);
+      paint_buffer = gimp_paint_core_get_paint_buffer (paint_core, drawable,
+                                                       paint_options, coords,
+                                                       &paint_buffer_x,
+                                                       &paint_buffer_y,
+                                                       NULL, NULL);
+      if (! paint_buffer)
+        continue;
+
+      gimp_smudge_accumulator_coords (paint_core, coords, 0, &x, &y);
 
       /*  If clipped, prefill the smudge buffer with the color at the
        *  brush position.
@@ -257,6 +258,7 @@ gimp_smudge_start (GimpPaintCore    *paint_core,
                                         paint_buffer_y - y,
                                         0, 0));
     }
+  smudge->accum_buffers = g_list_reverse (smudge->accum_buffers);
 
   return TRUE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]