From f6c626fba3fdf86d567133e7a1d446ac48ed8271 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 19 Jul 2007 09:09:26 +0000 Subject: [PATCH] chain up. 2007-07-19 Sven Neumann * app/tools/gimpcolortool.c (gimp_color_tool_draw): chain up. svn path=/trunk/; revision=22957 --- ChangeLog | 4 +++ app/tools/gimpcolortool.c | 62 ++++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9804fd86f..36f6df4bd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-07-19 Sven Neumann + + * app/tools/gimpcolortool.c (gimp_color_tool_draw): chain up. + 2007-07-18 Sven Neumann * app/pdb/gimpprocedure.[ch] (gimp_procedure_set_strings): added diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c index fdb31f196d..67e281c1a1 100644 --- a/app/tools/gimpcolortool.c +++ b/app/tools/gimpcolortool.c @@ -551,41 +551,43 @@ gimp_color_tool_draw (GimpDrawTool *draw_tool) { GimpColorTool *color_tool = GIMP_COLOR_TOOL (draw_tool); - if (! color_tool->enabled) - return; - - if (color_tool->moving_sample_point) + if (color_tool->enabled) { - if (color_tool->sample_point_x != -1 && - color_tool->sample_point_y != -1) + if (color_tool->moving_sample_point) { - gimp_draw_tool_draw_line (draw_tool, - 0, color_tool->sample_point_y + 0.5, - draw_tool->display->image->width, - color_tool->sample_point_y + 0.5, - FALSE); - gimp_draw_tool_draw_line (draw_tool, - color_tool->sample_point_x + 0.5, 0, - color_tool->sample_point_x + 0.5, - draw_tool->display->image->height, - FALSE); + if (color_tool->sample_point_x != -1 && + color_tool->sample_point_y != -1) + { + gimp_draw_tool_draw_line (draw_tool, + 0, color_tool->sample_point_y + 0.5, + draw_tool->display->image->width, + color_tool->sample_point_y + 0.5, + FALSE); + gimp_draw_tool_draw_line (draw_tool, + color_tool->sample_point_x + 0.5, 0, + color_tool->sample_point_x + 0.5, + draw_tool->display->image->height, + FALSE); + } + } + else + { + if (color_tool->options->sample_average) + { + gdouble radius = color_tool->options->average_radius; + + gimp_draw_tool_draw_rectangle (draw_tool, + FALSE, + color_tool->center_x - radius, + color_tool->center_y - radius, + 2 * radius + 1, + 2 * radius + 1, + TRUE); + } } } - else - { - if (color_tool->options->sample_average) - { - gdouble radius = color_tool->options->average_radius; - gimp_draw_tool_draw_rectangle (draw_tool, - FALSE, - color_tool->center_x - radius, - color_tool->center_y - radius, - 2 * radius + 1, - 2 * radius + 1, - TRUE); - } - } + GIMP_DRAW_TOOL_CLASS (parent_class)->draw (draw_tool); } static gboolean