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



commit 16a0f3ba6da59195b4410c39cc4aa058599cc41f
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]