Commit d6762ee1 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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.
parent 1e019a57
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
......
......@@ -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,
......
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