Commit b91651fe authored by William Skaggs's avatar William Skaggs
Browse files

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.
parent c635b2be
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));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment