chain up.

2007-07-19  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcolortool.c (gimp_color_tool_draw): chain up.

svn path=/trunk/; revision=22957
This commit is contained in:
Sven Neumann
2007-07-19 09:09:26 +00:00
committed by Sven Neumann
parent 17d4af0080
commit f6c626fba3
2 changed files with 36 additions and 30 deletions

View File

@ -1,3 +1,7 @@
2007-07-19 Sven Neumann <sven@gimp.org>
* app/tools/gimpcolortool.c (gimp_color_tool_draw): chain up.
2007-07-18 Sven Neumann <sven@gimp.org>
* app/pdb/gimpprocedure.[ch] (gimp_procedure_set_strings): added

View File

@ -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