don't compare the result of sqrt() with something, compare the original
2007-03-29 Michael Natterer <mitch@gimp.org> * app/tools/gimptool.c (gimp_tool_check_click_distance): don't compare the result of sqrt() with something, compare the original value with something's square instead. svn path=/trunk/; revision=22195
This commit is contained in:

committed by
Michael Natterer

parent
410d8a5546
commit
ca83552cd6
@ -1,3 +1,9 @@
|
|||||||
|
2007-03-29 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/tools/gimptool.c (gimp_tool_check_click_distance): don't
|
||||||
|
compare the result of sqrt() with something, compare the original
|
||||||
|
value with something's square instead.
|
||||||
|
|
||||||
2007-03-29 Sven Neumann <sven@gimp.org>
|
2007-03-29 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/core/gimpbrushgenerated.c (gimp_brush_generated_calc): moved
|
* app/core/gimpbrushgenerated.c (gimp_brush_generated_calc): moved
|
||||||
@ -120,7 +126,7 @@
|
|||||||
(gimp_display_shell_update_cursor): move variables to local
|
(gimp_display_shell_update_cursor): move variables to local
|
||||||
scopes. Follow GimpStatusbar API change. Cleanup.
|
scopes. Follow GimpStatusbar API change. Cleanup.
|
||||||
|
|
||||||
(gimp_display_shell_clear_cursor): ditto. Follow GimpColorFrame
|
(gimp_display_shell_clear_cursor): ditto. Follow GimpCursorView
|
||||||
API change.
|
API change.
|
||||||
|
|
||||||
2007-03-20 Michael Natterer <mitch@gimp.org>
|
2007-03-20 Michael Natterer <mitch@gimp.org>
|
||||||
|
@ -537,7 +537,7 @@ gimp_tool_check_click_distance (GimpTool *tool,
|
|||||||
dx = SCALEX (shell, tool->button_press_coords.x - coords->x);
|
dx = SCALEX (shell, tool->button_press_coords.x - coords->x);
|
||||||
dy = SCALEY (shell, tool->button_press_coords.y - coords->y);
|
dy = SCALEY (shell, tool->button_press_coords.y - coords->y);
|
||||||
|
|
||||||
if (sqrt (SQR (dx) + SQR (dy)) > double_click_distance)
|
if ((SQR (dx) + SQR (dy)) > SQR (double_click_distance))
|
||||||
{
|
{
|
||||||
tool->in_click_distance = FALSE;
|
tool->in_click_distance = FALSE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user