[gimp] app: oper_update(): if we are not in proximity, set the function to DEAD



commit f214b4f9b774f3314c7894bdea5205d924a4ddc0
Author: Michael Natterer <mitch gimp org>
Date:   Mon Mar 1 23:34:52 2010 +0100

    app: oper_update(): if we are not in proximity, set the function to DEAD
    
    so all hovering is undrawn. oper_update() is called with proximity ==
    FALSE when the pointer leaves the canvas, either to the outside or
    into an overlay widget, so this is exactly the right thing to do (and
    is probably missing from a lot of other tools too).

 app/tools/gimprectangletool.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c
index 9f1102f..0fd4e00 100644
--- a/app/tools/gimprectangletool.c
+++ b/app/tools/gimprectangletool.c
@@ -1582,7 +1582,11 @@ gimp_rectangle_tool_oper_update (GimpTool         *tool,
       return;
     }
 
-  if (gimp_rectangle_tool_coord_outside (rect_tool, coords))
+  if (! proximity)
+    {
+      function = GIMP_RECTANGLE_TOOL_DEAD;
+    }
+  else if (gimp_rectangle_tool_coord_outside (rect_tool, coords))
     {
       /* The cursor is outside of the rectangle, clicking should
        * create a new rectangle.



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