From 29e4cf347bd5d64898bc6d71d661ae326eea5d04 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 4 May 2004 13:09:39 +0000 Subject: [PATCH] Fix bug #141719: 2004-05-04 Michael Natterer Fix bug #141719: * app/tools/gimpmovetool.c (gimp_move_tool_motion): use RINT() instead of ROUND() to round double coords to guide positions. * app/display/gimpdisplayshell-callbacks.c (gimp_display_shell_canvas_tool_events): pass RINT()-rounded coords to gimp_display_shell_update_cursor() instead of implicitly truncating by casting to int. --- ChangeLog | 12 ++++++++++++ app/display/gimpdisplayshell-callbacks.c | 8 ++++---- app/tools/gimpmovetool.c | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba125c2299..c633c0878c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2004-05-04 Michael Natterer + + Fix bug #141719: + + * app/tools/gimpmovetool.c (gimp_move_tool_motion): use RINT() + instead of ROUND() to round double coords to guide positions. + + * app/display/gimpdisplayshell-callbacks.c + (gimp_display_shell_canvas_tool_events): pass RINT()-rounded + coords to gimp_display_shell_update_cursor() instead of implicitly + truncating by casting to int. + 2004-05-04 Michael Natterer * app/widgets/gimpundoeditor.c: removed code duplication by adding diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c index 060c3fa2e7..698bb03f29 100644 --- a/app/display/gimpdisplayshell-callbacks.c +++ b/app/display/gimpdisplayshell-callbacks.c @@ -1282,10 +1282,10 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, if (update_cursor) { gimp_display_shell_update_cursor (shell, - display_coords.x, - display_coords.y, - image_coords.x, - image_coords.y); + RINT (display_coords.x), + RINT (display_coords.y), + RINT (image_coords.x), + RINT (image_coords.y)); } return return_val; diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c index bcdd6af6b5..8644d1b922 100644 --- a/app/tools/gimpmovetool.c +++ b/app/tools/gimpmovetool.c @@ -480,9 +480,9 @@ gimp_move_tool_motion (GimpTool *tool, else { if (move->guide_orientation == GIMP_ORIENTATION_HORIZONTAL) - move->guide_position = ROUND (coords->y); + move->guide_position = RINT (coords->y); else - move->guide_position = ROUND (coords->x); + move->guide_position = RINT (coords->x); } gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));