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:
William Skaggs 2005-06-02 22:48:43 +00:00
parent c635b2be13
commit b91651fe8f
2 changed files with 19 additions and 13 deletions

View File

@ -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

View File

@ -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));
}