Skip to content

Commit

Permalink
Fixed -[CPTFill initWithCoder:] -- class cluster hides subclasses whe…
Browse files Browse the repository at this point in the history
…n archiving.
  • Loading branch information
eskroch committed Jul 17, 2011
1 parent 1e973c0 commit c1f82a6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion framework/Source/CPTFill.m
Expand Up @@ -103,7 +103,21 @@ -(void)encodeWithCoder:(NSCoder *)coder

-(id)initWithCoder:(NSCoder *)coder
{
// do nothing--implemented in subclasses
id fill = [coder decodeObjectForKey:@"_CPTFillColor.fillColor"];
if ( fill ) {
return [self initWithColor:fill];
}

fill = [coder decodeObjectForKey:@"_CPTFillGradient.fillGradient"];
if ( fill ) {
return [self initWithGradient:fill];
}

fill = [coder decodeObjectForKey:@"_CPTFillImage.fillImage"];
if ( fill ) {
return [self initWithImage:fill];
}

return nil;
}

Expand Down

0 comments on commit c1f82a6

Please sign in to comment.