Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions macosx/PiecesView.mm
Expand Up @@ -129,7 +129,7 @@ - (void)setTorrent:(Torrent*)torrent
self.image = [[NSImage alloc] initWithSize:self.bounds.size];

[self clearView];
[self setNeedsDisplay];
self.needsDisplay = YES;
}

- (void)clearView
Expand Down Expand Up @@ -196,7 +196,7 @@ - (void)updateView
NSRectFillListWithColors(cFillRects, cFillColors, numCells);
return YES;
}];
[self setNeedsDisplay];
self.needsDisplay = YES;
}

// save the current state so we can compare it later
Expand Down
8 changes: 7 additions & 1 deletion macosx/TorrentTableView.mm
Expand Up @@ -126,7 +126,13 @@ - (void)awakeFromNib
//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
Expand Down