make sure to retain the attributes dictionary

This commit is contained in:
Mitchell Livingston 2007-09-28 13:05:01 +00:00
parent f5bd7f17ce
commit dc7a374fb3
1 changed files with 1 additions and 4 deletions

View File

@ -42,11 +42,8 @@
{
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"DisplayPeerProgressBarNumber"])
{
NSMutableParagraphStyle *centeredStyle = [[[NSMutableParagraphStyle alloc] init] autorelease];
[centeredStyle setAlignment:NSCenterTextAlignment];
if (!fAttributes)
fAttributes = [NSDictionary dictionaryWithObject: [NSFont systemFontOfSize: 11.0] forKey: NSFontAttributeName];
fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: [NSFont systemFontOfSize: 11.0], NSFontAttributeName, nil];
[[NSString stringWithFormat: @"%.1f%%", [self floatValue] * 100.0] drawInRect: cellFrame withAttributes: fAttributes];
}
else