Skip to content

Commit

Permalink
Revert "fix 'setNeedsDisplay' is deprecated: first deprecated in macO…
Browse files Browse the repository at this point in the history
…S 10.14 (transmission#5633)"

This reverts commit 90f8db7.
  • Loading branch information
tearfur committed Sep 1, 2023
1 parent 24077e3 commit 4111f95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions macosx/PiecesView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ - (void)setTorrent:(Torrent*)torrent
self.image = [[NSImage alloc] initWithSize:self.bounds.size];

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

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

// save the current state so we can compare it later
Expand Down
8 changes: 1 addition & 7 deletions macosx/TorrentTableView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,7 @@ - (void)awakeFromNib
//disable highlight color and set manually in drawRow
[self setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone];

[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(refreshTorrentTable) name:@"RefreshTorrentTable"
object:nil];
}

- (void)refreshTorrentTable
{
self.needsDisplay = YES;
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(setNeedsDisplay) name:@"RefreshTorrentTable" object:nil];
}

- (BOOL)isGroupCollapsed:(NSInteger)value
Expand Down

0 comments on commit 4111f95

Please sign in to comment.