Commit ed9f8876 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

bail out early if the coords are out-of-image plus a border of the

2005-04-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-snap.c: bail out early if the coords are
	out-of-image plus a border of the snapping epsilon, and not just
	out-of-image. Fixes bug #169892.
parent 3643e719
2005-04-19 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-snap.c: bail out early if the coords are
out-of-image plus a border of the snapping epsilon, and not just
out-of-image. Fixes bug #169892.
2005-04-18 Manish Singh <yosh@gimp.org>
* libgimpwidgets/gimpsizeentry.c: #include gimpwidgets.h for
......
......@@ -61,7 +61,7 @@ gimp_image_snap_x (GimpImage *gimage,
if (! (snap_to_guides || snap_to_grid || snap_to_canvas))
return FALSE;
if (x < 0 || x >= gimage->width)
if (x < -epsilon_x || x >= (gimage->width + epsilon_x))
return FALSE;
if (snap_to_guides)
......@@ -165,7 +165,7 @@ gimp_image_snap_y (GimpImage *gimage,
if (! (snap_to_guides || snap_to_grid || snap_to_canvas))
return FALSE;
if (y < 0 || y >= gimage->height)
if (y < -epsilon_y || y >= (gimage->height + epsilon_y))
return FALSE;
if (snap_to_guides)
......@@ -277,8 +277,8 @@ gimp_image_snap_point (GimpImage *gimage,
if (! (snap_to_guides || snap_to_grid || snap_to_canvas || snap_to_vectors))
return FALSE;
if (x < 0 || x >= gimage->width ||
y < 0 || y >= gimage->height)
if (x < -epsilon_x || x >= (gimage->width + epsilon_x) ||
y < -epsilon_y || y >= (gimage->height + epsilon_y))
{
return FALSE;
}
......
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