gimp r27605 - in trunk: . app/tools
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27605 - in trunk: . app/tools
- Date: Mon, 10 Nov 2008 20:10:50 +0000 (UTC)
Author: martinn
Date: Mon Nov 10 20:10:50 2008
New Revision: 27605
URL: http://svn.gnome.org/viewvc/gimp?rev=27605&view=rev
Log:
Bug 559716 â Changing crop size in Crop Tool Options can make UI
unresponsive
* app/tools/gimprectangletool.c: Accept a broader range of x, y,
width and height values from the tool options so we don't end up
in an infinite signal emission loop.
Modified:
trunk/ChangeLog
trunk/app/tools/gimprectangletool.c
Modified: trunk/app/tools/gimprectangletool.c
==============================================================================
--- trunk/app/tools/gimprectangletool.c (original)
+++ trunk/app/tools/gimprectangletool.c Mon Nov 10 20:10:50 2008
@@ -92,7 +92,8 @@
} SideToResize;
-#define FEQUAL(a,b) (fabs ((a) - (b)) < 0.0001)
+#define FEQUAL(a,b) (fabs ((a) - (b)) < 0.0001)
+#define PIXEL_FEQUAL(a,b) (fabs ((a) - (b)) < 0.5)
#define GIMP_RECTANGLE_TOOL_GET_PRIVATE(obj) \
(gimp_rectangle_tool_get_private (GIMP_RECTANGLE_TOOL (obj)))
@@ -2324,7 +2325,7 @@
gimp_draw_tool_resume (GIMP_DRAW_TOOL (rect_tool));
}
else if (strcmp (pspec->name, "x") == 0 &&
- !FEQUAL (private->x1, options_private->x))
+ !PIXEL_FEQUAL (private->x1, options_private->x))
{
gimp_rectangle_tool_synthesize_motion (rect_tool,
GIMP_RECTANGLE_TOOL_MOVING,
@@ -2332,7 +2333,7 @@
private->y1);
}
else if (strcmp (pspec->name, "y") == 0 &&
- !FEQUAL (private->y1, options_private->y))
+ !PIXEL_FEQUAL (private->y1, options_private->y))
{
gimp_rectangle_tool_synthesize_motion (rect_tool,
GIMP_RECTANGLE_TOOL_MOVING,
@@ -2340,7 +2341,7 @@
options_private->y);
}
else if (strcmp (pspec->name, "width") == 0 &&
- !FEQUAL (private->x2 - private->x1, options_private->width))
+ !PIXEL_FEQUAL (private->x2 - private->x1, options_private->width))
{
/* Calculate x2, y2 that will create a rectangle of given width, for the
* current options.
@@ -2363,7 +2364,7 @@
private->y2);
}
else if (strcmp (pspec->name, "height") == 0 &&
- !FEQUAL (private->y2 - private->y1, options_private->height))
+ !PIXEL_FEQUAL (private->y2 - private->y1, options_private->height))
{
/* Calculate x2, y2 that will create a rectangle of given height, for the
* current options.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]