[gimp] app: some code reordering in gimp_blend_tool_button_press()



commit 667435c1054b6de448125707e160a58b900418cf
Author: Michael Natterer <mitch gimp org>
Date:   Sun Jun 11 23:41:56 2017 +0200

    app: some code reordering in gimp_blend_tool_button_press()

 app/tools/gimpblendtool.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c
index 57fc544..d7eefb9 100644
--- a/app/tools/gimpblendtool.c
+++ b/app/tools/gimpblendtool.c
@@ -354,9 +354,16 @@ gimp_blend_tool_button_press (GimpTool            *tool,
     {
       GimpDisplayShell *shell = gimp_display_get_shell (display);
 
+      blend_tool->start_x = coords->x;
+      blend_tool->start_y = coords->y;
+      blend_tool->end_x   = coords->x;
+      blend_tool->end_y   = coords->y;
+
       blend_tool->line = gimp_tool_line_new (shell,
-                                             coords->x, coords->y,
-                                             coords->x, coords->y);
+                                             blend_tool->start_x,
+                                             blend_tool->start_y,
+                                             blend_tool->end_x,
+                                             blend_tool->end_y);
 
       gimp_tool_widget_hover (blend_tool->line, coords, state, TRUE);
 
@@ -364,11 +371,6 @@ gimp_blend_tool_button_press (GimpTool            *tool,
                         G_CALLBACK (gimp_blend_tool_line_changed),
                         blend_tool);
 
-      blend_tool->start_x = coords->x;
-      blend_tool->start_y = coords->y;
-      blend_tool->end_x   = coords->x;
-      blend_tool->end_y   = coords->y;
-
       gimp_blend_tool_start (blend_tool, display);
     }
 


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