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:
parent
76166d8fa7
commit
bd9d110d45
2 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue