hopefully fix weird drawing issues when resizing, and eliminate a memory leak

This commit is contained in:
Mitchell Livingston
2008-01-24 01:05:00 +00:00
parent 8f21d06cb0
commit da6a108375
4 changed files with 2001 additions and 1992 deletions

View File

@@ -58,6 +58,8 @@
{
fDefaults = [NSUserDefaults standardUserDefaults];
fTorrentCell = [[TorrentCell alloc] init];
fMouseControlRow = -1;
fMouseRevealRow = -1;
fMouseActionRow = -1;
@@ -73,8 +75,10 @@
- (void) awakeFromNib
{
[self setGridStyleMask: NSTableViewSolidVerticalGridLineMask]; //weird redrawing issues if set to none
if (![NSApp isOnLeopardOrBetter])
[[self tableColumnWithIdentifier: @"Torrent"] setDataCell: [[[TorrentCell alloc] init] autorelease]];
[[self tableColumnWithIdentifier: @"Torrent"] setDataCell: fTorrentCell];
}
- (void) dealloc
@@ -86,6 +90,8 @@
[fKeyStrokes release];
[fMenuTorrent release];
[fTorrentCell release];
[super dealloc];
}
@@ -99,9 +105,10 @@
fGroupIndexes = indexes;
}
#warning needed?
- (id) dataCellForRow: (NSInteger) row
{
return (row == -1 || ![fGroupIndexes containsIndex: row]) ? [[[TorrentCell alloc] init] autorelease] : nil;
return (row == -1 || ![fGroupIndexes containsIndex: row]) ? fTorrentCell : nil;
}
- (BOOL) tableView: (NSTableView *) tableView isGroupRow: (NSInteger) row