From dc7a374fb3add292c894a39000cfa64ed0da9f82 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Fri, 28 Sep 2007 13:05:01 +0000 Subject: [PATCH] make sure to retain the attributes dictionary --- macosx/PeerProgressIndicatorCell.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/macosx/PeerProgressIndicatorCell.m b/macosx/PeerProgressIndicatorCell.m index 97fa1a35e..5bfefa55b 100644 --- a/macosx/PeerProgressIndicatorCell.m +++ b/macosx/PeerProgressIndicatorCell.m @@ -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