From 16b9ac19f03d296690f63d83626458dcc90bbbd8 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Sun, 21 Aug 2022 17:00:42 +0100 Subject: [PATCH] Reset colours for each track on update_display --- app/playlists.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/playlists.py b/app/playlists.py index b07bd41..d639e46 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -974,6 +974,9 @@ class PlaylistTab(QTableWidget): track = session.get(Tracks, track_id) if track: + # Reset colour in case it was current/next/unplayable + self._set_row_colour(row, None) + # Render unplayable tracks in correct colour if not file_is_readable(track.path): self._set_row_colour(row, QColor(Config.COLOUR_UNREADABLE)) @@ -1037,10 +1040,6 @@ class PlaylistTab(QTableWidget): self._set_row_bold(row) continue - # This is a track row other than next or current - # Reset colour in case it was current/next - self._set_row_colour(row, None) - if row in played: # Played today, so update last played column self.item(row, columns['lastplayed'].idx).setText(