diff --git a/ChangeLog b/ChangeLog index 32e6ac745..9749000bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-28 21:58 Gregory John Casamento + + * Source/NSColorWell.m: [NSColorWell mouseDown:] prevent use + of the colorwell when it's disabled. + 2005-01-28 17:57 Alexander Malmberg * Source/NSImageCell.m (-drawInteriorWithFrame:inView:): If our diff --git a/Source/NSColorWell.m b/Source/NSColorWell.m index fce16768e..e0ee21a4b 100644 --- a/Source/NSColorWell.m +++ b/Source/NSColorWell.m @@ -277,22 +277,29 @@ static NSString *GSColorWellDidBecomeExclusiveNotification = - (void) mouseDown: (NSEvent *)theEvent { - NSPoint point = [self convertPoint: [theEvent locationInWindow] + // + // OPENSTEP 4.2 and OSX behavior indicates that the colorwell doesn't + // work when the widget is marked as disabled. + // + if([self isEnabled]) + { + NSPoint point = [self convertPoint: [theEvent locationInWindow] fromView: nil]; - if ([self mouse: point inRect: _wellRect]) - { - [NSColorPanel dragColor: _the_color - withEvent: theEvent - fromView: self]; - } - else if (_is_active == NO) - { - [self activate: YES]; - } - else - { - [self deactivate]; + if ([self mouse: point inRect: _wellRect]) + { + [NSColorPanel dragColor: _the_color + withEvent: theEvent + fromView: self]; + } + else if (_is_active == NO) + { + [self activate: YES]; + } + else + { + [self deactivate]; + } } }