[gimp/blend-tool-fun: 5/10] app: Prevent grabbing handles after halting in the blend tool.



commit 8e796856247cbddf6865e3ccf54595a20e2c9601
Author: Michael Henning <drawoc darkrefraction com>
Date:   Thu Jun 19 16:53:41 2014 -0400

    app: Prevent grabbing handles after halting in the blend tool.

 app/tools/gimpblendtool.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c
index 0acc640..ea8f959 100644
--- a/app/tools/gimpblendtool.c
+++ b/app/tools/gimpblendtool.c
@@ -281,9 +281,6 @@ gimp_blend_tool_button_press (GimpTool            *tool,
       gimp_blend_tool_halt (blend_tool);
     }
 
-  if (! tool->display)
-    gimp_blend_tool_start (blend_tool, display);
-
   switch (gimp_blend_tool_get_point_under_cursor (blend_tool))
     {
     case POINT_NONE:
@@ -306,6 +303,14 @@ gimp_blend_tool_button_press (GimpTool            *tool,
       break;
     }
 
+  /*
+   * gimp_blend_tool_start comes after determining what point is grabbed, so
+   * whenever we're starting the tool, gimp_blend_tool_get_point_under_cursor()
+   * returns POINT_NONE
+   */
+  if (! tool->display)
+    gimp_blend_tool_start (blend_tool, display);
+
   tool->display = display;
   gimp_blend_tool_update_items (blend_tool);
 


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