Commit aeff2f27 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

only update the view if there's actually a change.

2005-04-07  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpcolorframe.c (gimp_color_frame_set_color): only
	update the view if there's actually a change.
parent e52c59ef
2005-04-07 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcolorframe.c (gimp_color_frame_set_color): only
update the view if there's actually a change.
2005-04-07 Sven Neumann <sven@gimp.org>
* libgimpconfig/gimpconfig-utils.[ch]: changed GimpConfig utility
......
......@@ -179,6 +179,15 @@ gimp_color_frame_set_color (GimpColorFrame *frame,
g_return_if_fail (GIMP_IS_COLOR_FRAME (frame));
g_return_if_fail (color != NULL);
if (frame->sample_valid &&
frame->sample_type == sample_type &&
frame->color_index == color_index &&
gimp_rgb_distance (&frame->color, color) < 0.0001)
{
frame->color = *color;
return;
}
frame->sample_valid = TRUE;
frame->sample_type = sample_type;
frame->color = *color;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment