mirror of https://github.com/GNOME/gimp.git
Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion): Don't change function before creating new rectangle; cause of problem identified by Karine Delvare.
This commit is contained in:
parent
c635b2be13
commit
b91651fe8f
|
@ -1,4 +1,10 @@
|
|||
2005-06-01 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
2005-06-02 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion):
|
||||
Don't change function before creating new rectangle;
|
||||
cause of problem identified by Karine Delvare.
|
||||
|
||||
2005-06-02 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* plug-ins/common/screenshot.c: trap errors when running
|
||||
XGrabKey, to prevent bail-out on BadAccess error as
|
||||
|
|
|
@ -414,18 +414,6 @@ gimp_rectangle_tool_motion (GimpTool *tool,
|
|||
x2 = curx;
|
||||
y2 = cury;
|
||||
|
||||
if (rectangle->function == RECT_CREATING)
|
||||
{
|
||||
if (x1 > x2 && y1 > y2)
|
||||
rectangle->function = RECT_RESIZING_UPPER_LEFT;
|
||||
else if (x1 > x2 && y1 < y2)
|
||||
rectangle->function = RECT_RESIZING_LOWER_LEFT;
|
||||
else if (x1 < x2 && y1 > y2)
|
||||
rectangle->function = RECT_RESIZING_UPPER_RIGHT;
|
||||
else if (x1 < x2 && y1 < y2)
|
||||
rectangle->function = RECT_RESIZING_LOWER_RIGHT;
|
||||
}
|
||||
|
||||
inc_x = (x2 - x1);
|
||||
inc_y = (y2 - y1);
|
||||
|
||||
|
@ -819,6 +807,18 @@ gimp_rectangle_tool_motion (GimpTool *tool,
|
|||
rectangle->y2 - rectangle->y1);
|
||||
}
|
||||
|
||||
if (rectangle->function == RECT_CREATING)
|
||||
{
|
||||
if (inc_x < 0 && inc_y < 0)
|
||||
rectangle->function = RECT_RESIZING_UPPER_LEFT;
|
||||
else if (inc_x < 0 && inc_y > 0)
|
||||
rectangle->function = RECT_RESIZING_LOWER_LEFT;
|
||||
else if (inc_x > 0 && inc_y < 0)
|
||||
rectangle->function = RECT_RESIZING_UPPER_RIGHT;
|
||||
else if (inc_x > 0 && inc_y > 0)
|
||||
rectangle->function = RECT_RESIZING_LOWER_RIGHT;
|
||||
}
|
||||
|
||||
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue