[gimp/gimp-2-10] app: in paint tools, fix cursor position in line mode when snapping to angle



commit 5d1c6039e0e73502e9257ed494e098a09d39ed7b
Author: Ell <ell_se yahoo com>
Date:   Fri Feb 21 13:00:51 2020 +0200

    app: in paint tools, fix cursor position in line mode when snapping to angle
    
    In GimpPaintTool, when not snapping brush outline to stroke, make
    sure to properly snap the cursor position to 15-degree angle
    multiples in line mode, not only when painting the line, but also
    during motion.
    
    (cherry picked from commit 0f07f1baa58c628cb62725a2c5b528c3587f4222)

 app/tools/gimppainttool.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index e6ffc3bcf9..48eb215bc0 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -604,9 +604,6 @@ gimp_paint_tool_oper_update (GimpTool         *tool,
       core->cur_coords.x -= off_x;
       core->cur_coords.y -= off_y;
 
-      paint_tool->cursor_x = core->cur_coords.x;
-      paint_tool->cursor_y = core->cur_coords.y;
-
       if (display == tool->display && (state & GIMP_PAINT_TOOL_LINE_MASK))
         {
           /*  If shift is down and this is not the first paint stroke,
@@ -666,6 +663,9 @@ gimp_paint_tool_oper_update (GimpTool         *tool,
       gimp_tool_push_status (tool, display, "%s", status);
       g_free (status);
 
+      paint_tool->cursor_x = core->cur_coords.x;
+      paint_tool->cursor_y = core->cur_coords.y;
+
       if (! gimp_draw_tool_is_active (draw_tool))
         gimp_draw_tool_start (draw_tool, display);
     }


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