1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

fix 'setNeedsDisplay' is deprecated: first deprecated in macOS 10.14 (#5633)

This commit is contained in:
Cœur 2023-06-18 20:32:34 +02:00 committed by GitHub
parent 76166d8fa7
commit bd9d110d45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -129,7 +129,7 @@ typedef struct PieceInfo
self.image = [[NSImage alloc] initWithSize:self.bounds.size];
[self clearView];
[self setNeedsDisplay];
self.needsDisplay = YES;
}
- (void)clearView
@ -196,7 +196,7 @@ typedef struct PieceInfo
NSRectFillListWithColors(cFillRects, cFillColors, numCells);
return YES;
}];
[self setNeedsDisplay];
self.needsDisplay = YES;
}
// save the current state so we can compare it later

View file

@ -126,7 +126,13 @@ static NSTimeInterval const kToggleProgressSeconds = 0.175;
//disable highlight color and set manually in drawRow
[self setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(setNeedsDisplay) name:@"RefreshTorrentTable" object:nil];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(refreshTorrentTable) name:@"RefreshTorrentTable"
object:nil];
}
- (void)refreshTorrentTable
{
self.needsDisplay = YES;
}
- (BOOL)isGroupCollapsed:(NSInteger)value