From 4e918fc8687cbe368bfd4d699a581023d36fc66c Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 20 Jan 2022 17:58:24 -0800 Subject: [PATCH] Playlist View: Refresh playlist entries when queue is emptied --- Playlist/PlaylistController.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index fa5dcffac..9c56fbbc6 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -1088,12 +1088,19 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc } - (void)emptyQueueListUnsynced { + NSMutableIndexSet * refreshSet = [[NSMutableIndexSet alloc] init]; + for (PlaylistEntry *queueItem in queueList) { queueItem.queued = NO; [queueItem setQueuePosition:-1]; + [refreshSet addIndex:[queueItem index]]; } [queueList removeAllObjects]; + + // Refresh entire row to refresh tooltips + unsigned long columns = [[self.tableView tableColumns] count]; + [self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]]; } - (IBAction)toggleQueued:(id)sender {