mirror of https://github.com/GNOME/gimp.git
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:
parent
1e019a57ff
commit
d6762ee166
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue