mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
e52c59eff3
commit
aeff2f27f7
|
@ -1,3 +1,8 @@
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue