[gimp] Revert "app: handle motion right just created size fixed rects"



commit c8cde4095251d391d395c0d6aaf91012a1d05cf6
Author: Alexia Death <alexiadeath gmail com>
Date:   Thu Oct 6 20:16:04 2011 +0300

    Revert "app: handle motion right just created size fixed rects"
    
    This reverts commit c8fa2c99e8036eb0920cd11f4ec7aa832b9aef4d.

 app/tools/gimprectangletool.c |   58 +++++++++++++++++++---------------------
 1 files changed, 28 insertions(+), 30 deletions(-)
---
diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c
index a5ff64c..d17a340 100644
--- a/app/tools/gimprectangletool.c
+++ b/app/tools/gimprectangletool.c
@@ -1201,6 +1201,32 @@ gimp_rectangle_tool_motion (GimpTool         *tool,
        * function to one of the corner-grabbed functions, depending on
        * in what direction the user starts dragging the rectangle.
        */
+      if (dx < 0)
+        {
+          function = (dy < 0 ?
+                      GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
+                      GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT);
+        }
+      else if (dx > 0)
+        {
+          function = (dy < 0 ?
+                      GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT :
+                      GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT);
+        }
+      else if (dy < 0)
+        {
+          function = (dx < 0 ?
+                      GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
+                      GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT);
+        }
+      else if (dy > 0)
+        {
+          function = (dx < 0 ?
+                      GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT :
+                      GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT);
+        }
+
+      gimp_rectangle_tool_set_function (rect_tool, function);
 
       if (gimp_rectangle_options_fixed_rule_active (options,
                                                     GIMP_RECTANGLE_TOOL_FIXED_SIZE))
@@ -1220,36 +1246,8 @@ gimp_rectangle_tool_motion (GimpTool         *tool,
                                               private->x2 - private->x1,
                                               private->y2 - private->y1);
 
-          gimp_rectangle_tool_set_function (rect_tool, GIMP_RECTANGLE_TOOL_MOVING);
-        }
-      else
-        {
-          if (dx < 0)
-            {
-              function = (dy < 0 ?
-                          GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
-                          GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT);
-            }
-          else if (dx > 0)
-            {
-              function = (dy < 0 ?
-                          GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT :
-                          GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT);
-            }
-          else if (dy < 0)
-            {
-              function = (dx < 0 ?
-                          GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
-                          GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT);
-            }
-          else if (dy > 0)
-            {
-              function = (dx < 0 ?
-                          GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT :
-                          GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT);
-            }
-
-          gimp_rectangle_tool_set_function (rect_tool, function);
+          gimp_rectangle_tool_set_function (rect_tool,
+                                            GIMP_RECTANGLE_TOOL_MOVING);
         }
     }
 



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