mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 06:51:08 +00:00
improve isEqual: for named colors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28809 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f6296e504f
commit
c8690dd5d7
1 changed files with 4 additions and 7 deletions
|
@ -1893,15 +1893,12 @@ static NSRecursiveLock *namedColorLock = nil;
|
||||||
|
|
||||||
- (BOOL) isEqual: (id)other
|
- (BOOL) isEqual: (id)other
|
||||||
{
|
{
|
||||||
|
/* Instances of this class are uniqued, so a test for pointer equality
|
||||||
|
* is sufficient.
|
||||||
|
*/
|
||||||
if (other == self)
|
if (other == self)
|
||||||
return YES;
|
return YES;
|
||||||
if ([other isKindOfClass: [self class]] == NO
|
return NO;
|
||||||
|| [[other catalogNameComponent] isEqualToString: _catalog_name] == NO
|
|
||||||
|| [[other colorNameComponent] isEqualToString: _color_name] == NO)
|
|
||||||
{
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
return YES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSColor*) colorUsingColorSpaceName: (NSString *)colorSpace
|
- (NSColor*) colorUsingColorSpaceName: (NSString *)colorSpace
|
||||||
|
|
Loading…
Reference in a new issue