Playlist View: Refresh entire rows on status changes to refresh tooltips

CQTexperiment
Christopher Snowhill 2022-01-20 15:51:24 -08:00
parent b78e55a50c
commit a4c3509e75
2 changed files with 19 additions and 7 deletions

View File

@ -972,7 +972,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
if (currentEntry != nil) [refreshSet addIndex:currentEntry.index];
if (pe != nil) [refreshSet addIndex:pe.index];
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndex:1]];
// Refresh entire row to refresh tooltips
unsigned long columns = [[self.tableView tableColumns] count];
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]];
if (pe != nil) [self.tableView scrollRowToVisible:pe.index];
@ -1090,7 +1092,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
DLog(@"TOGGLE QUEUED: %i", queueItem.queued);
}
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndex:1]];
// Refresh entire row to refresh tooltips
unsigned long columns = [[self.tableView tableColumns] count];
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]];
int i = 0;
for (PlaylistEntry *cur in queueList) {
@ -1113,7 +1117,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
[refreshSet addIndex:[queueItem index]];
}
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndex:1]];
// Refresh entire row to refresh tooltips
unsigned long columns = [[self.tableView tableColumns] count];
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]];
int i = 0;
for (PlaylistEntry *cur in queueList) {
@ -1136,7 +1142,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
[refreshSet addIndex:[queueItem index]];
}
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndex:1]];
// Refresh entire row to refresh tooltips
unsigned long columns = [[self.tableView tableColumns] count];
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]];
int i = 0;
for (PlaylistEntry *cur in queueList) {
@ -1149,7 +1157,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
NSIndexSet * refreshSet = [NSIndexSet indexSetWithIndex:[currentEntry index]];
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndex:1]];
// Refresh entire row to refresh tooltips
unsigned long columns = [[self.tableView tableColumns] count];
[self.tableView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]];
}
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem {

View File

@ -717,7 +717,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
{
unsigned long columns = [[[self->playlistView documentView] tableColumns] count];
[self->playlistView.documentView reloadDataForRowIndexes:update_indexes columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0,columns-1)]];
[self->playlistView.documentView reloadDataForRowIndexes:update_indexes columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0,columns)]];
}
}
@ -778,7 +778,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
[refreshSet addIndex:[pe index]];
}
[playlistView.documentView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndex:1]];
// Refresh entire row to refresh tooltips
unsigned long columns = [[playlistView.documentView tableColumns] count];
[playlistView.documentView reloadDataForRowIndexes:refreshSet columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]];
}
//Clear the selection