fixed assignment of local variable "rectangle_exists".

2005-09-25  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimpcroptool.c: fixed assignment of local variable
  "rectangle_exists".
This commit is contained in:
Karine Delvare 2005-09-25 15:27:11 +00:00 committed by Karine Delvare
parent 44ba775533
commit 13041a7ebd
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-09-25 Karine Delvare <kdelvare@nerim.net>
* app/tools/gimpcroptool.c: fixed assignment of local variable
"rectangle_exists".
2005-09-25 Sven Neumann <sven@gimp.org>
* app/tools/gimpnewrectselecttool.c: fixed assignment of local

View File

@ -227,21 +227,25 @@ gimp_crop_tool_execute (GimpRectangleTool *rectangle,
max_x = gimage->width;
max_y = gimage->height;
rectangle_exists == (x <= max_x && y <= max_y
&& x + w >= 0 && y + h >= 0
&& w > 0 && h > 0);
rectangle_exists = (x <= max_x && y <= max_y &&
x + w >= 0 && y + h >= 0 &&
w > 0 && h > 0);
if (x < 0)
{
w += x;
x = 0;
}
if (y < 0)
{
h += y;
y = 0;
}
if (x + w > max_x)
w = max_x - x;
if (y + h > max_y)
h = max_y - y;