diff --git a/ChangeLog b/ChangeLog index 8e82f984b..17a8691e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-24 Richard Frith-Macdonald + + * Source/NSColorWell.m: Only send action if color changes ... fix + for bug #26277 + 2009-04-19 00:46-EDT Gregory John Casamento * Headers/AppKit/NSSearchFieldCell.h: Give the values assigned in diff --git a/Source/NSColorWell.m b/Source/NSColorWell.m index eb0516b04..a86fbbf10 100644 --- a/Source/NSColorWell.m +++ b/Source/NSColorWell.m @@ -432,16 +432,23 @@ static NSString *GSColorWellDidBecomeExclusiveNotification = if ([sender respondsToSelector: @selector(color)]) { + NSColor *c = [(id)sender color]; + /* Don't use -setColor: as that would send a message back to the * panel telling it to se its color again. * Instead we assign the color and mark for redisplay directly. + * NB. For MacOS-X compatibility, we only send the action if the + * coor has actually changed. */ - ASSIGN(_the_color, [(id)sender color]); - [self setNeedsDisplay: YES]; - /* When our color is changed from the color panel, we should - * send our action. - */ - [self sendAction: _action to: _target]; + if (c != nil && [c isEqual: _the_color] == NO) + { + ASSIGN(_the_color, [(id)sender color]); + [self setNeedsDisplay: YES]; + /* When our color is changed from the color panel, we should + * send our action. + */ + [self sendAction: _action to: _target]; + } } }