[gimp/gimp-2-6] Bug 567393 – Rectangle select tool size shrinks to 0 if size is larger than
- From: Sven Neumann <neo src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp/gimp-2-6] Bug 567393 – Rectangle select tool size shrinks to 0 if size is larger than
- Date: Wed, 8 Jul 2009 19:33:28 +0000 (UTC)
commit 88a483bd18475dcab7f4c3cc31c641e77422d996
Author: Sven Neumann <sven gimp org>
Date: Tue Jun 30 23:19:13 2009 +0200
Bug 567393 â?? Rectangle select tool size shrinks to 0 if size is larger than
the image and the up or down arrow is pressed.
Applied patch from Massimo as found in bug #567393. This changes ROUND()
to RINT() to correct rounding for negative numbers. Also did this change
in gimp_rectangle_tool_adjust_coord().
(cherry picked from commit 05537763ef9f88cdfcccd03e5023b39886d4f9f7)
app/tools/gimprectangletool.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c
index c9b6373..c26974f 100644
--- a/app/tools/gimprectangletool.c
+++ b/app/tools/gimprectangletool.c
@@ -4099,13 +4099,13 @@ gimp_rectangle_tool_update_int_rect (GimpRectangleTool *rect_tool)
{
GimpRectangleToolPrivate *priv = GIMP_RECTANGLE_TOOL_GET_PRIVATE (rect_tool);
- priv->x1_int = ROUND (priv->x1);
- priv->y1_int = ROUND (priv->y1);
+ priv->x1_int = RINT (priv->x1);
+ priv->y1_int = RINT (priv->y1);
if (gimp_rectangle_tool_rect_rubber_banding_func (rect_tool))
{
- priv->width_int = ROUND (priv->x2) - priv->x1_int;
- priv->height_int = ROUND (priv->y2) - priv->y1_int;
+ priv->width_int = (gint) RINT (priv->x2) - priv->x1_int;
+ priv->height_int = (gint) RINT (priv->y2) - priv->y1_int;
}
}
@@ -4176,8 +4176,8 @@ gimp_rectangle_tool_adjust_coord (GimpRectangleTool *rect_tool,
switch (priv->precision)
{
case GIMP_RECTANGLE_PRECISION_INT:
- *coord_x_output = ROUND (coord_x_input);
- *coord_y_output = ROUND (coord_y_input);
+ *coord_x_output = RINT (coord_x_input);
+ *coord_y_output = RINT (coord_y_input);
break;
case GIMP_RECTANGLE_PRECISION_DOUBLE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]