mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 06:28:54 +00:00
Fix encoding
This commit is contained in:
parent
ddce45a6a2
commit
38f4292989
1 changed files with 11 additions and 11 deletions
|
@ -541,6 +541,15 @@ static NSLock *_fontCollectionLock = nil;
|
|||
return fc;
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: _fontCollectionDictionary
|
||||
forKey: @"NSFontCollectionDictionary"];
|
||||
}
|
||||
}
|
||||
|
||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
self = [super init];
|
||||
|
@ -548,21 +557,12 @@ static NSLock *_fontCollectionLock = nil;
|
|||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: _fontCollectionDictionary
|
||||
forKey: @"NSFontCollectionDictionary"];
|
||||
ASSIGN(_fontCollectionDictionary,
|
||||
[coder decodeObjectForKey: @"NSFontCollectionDictionary"]);
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(_fontCollectionDictionary,
|
||||
[coder decodeObjectForKey: @"NSFontCollectionDictionary"]);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue