applied a patch from Dennis Bjorklund that prevents a possible division by

2006-02-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c: applied a patch from Dennis
	Bjorklund that prevents a possible division by zero and fixes the
	calculation of the center point.
This commit is contained in:
Sven Neumann 2006-02-07 11:38:17 +00:00 committed by Sven Neumann
parent 1e019a57ff
commit d6762ee166
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2006-02-07 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangletool.c: applied a patch from Dennis
Bjorklund that prevents a possible division by zero and fixes the
calculation of the center point.
2006-02-07 Sven Neumann <sven@gimp.org>
* app/core/gimp-gui.c

View File

@ -2548,13 +2548,13 @@ gimp_rectangle_tool_update_options (GimpRectangleTool *rectangle,
width = x2 - x1;
height = y2 - y1;
if (width > 0.01)
if (height > 0.01)
aspect = width / height;
else
aspect = 0;
aspect = 0.0;
center_x = (x1 + x2) / 2;
center_y = (y1 + y2) / 2;
center_x = (x1 + x2) / 2.0;
center_y = (y1 + y2) / 2.0;
g_signal_handlers_block_by_func (entry,
rectangle_dimensions_changed,