Set tab colours correctly

This commit is contained in:
Keith Edmunds 2023-03-17 22:43:36 +00:00
parent eafacc3b21
commit a30f054eb0

View File

@ -1210,14 +1210,6 @@ class Window(QMainWindow, Ui_MainWindow):
# If there's currently a track playing, fade it.
self.stop_playing(fade=True)
# Ensure playlist tabs are the correct colour
# If next track is on a different playlist_tab to the
# current track, reset the current track playlist_tab colour
current_tab = self.current_track.playlist_tab
if current_tab and current_tab != self.next_track.playlist_tab:
self.set_tab_colour(current_tab,
QColor(Config.COLOUR_NORMAL_TAB))
# Move next track to current track.
# stop_playing() above has called end_of_track_actions()
# which will have populated self.previous_track
@ -1232,6 +1224,7 @@ class Window(QMainWindow, Ui_MainWindow):
return
# Set current track playlist_tab colour
current_tab = self.current_track.playlist_tab
if current_tab:
self.set_tab_colour(
current_tab, QColor(Config.COLOUR_CURRENT_TAB))
@ -1257,17 +1250,6 @@ class Window(QMainWindow, Ui_MainWindow):
# Disable play next controls
self.disable_play_next_controls()
# If previous track playlist is showing and that's not the
# current track playlist, we need to reset the current track
# highlighting
if (
self.previous_track.playlist_tab == self.visible_playlist_tab()
and
self.current_track.playlist_tab != self.visible_playlist_tab()
and self.previous_track.plr_id
):
self.previous_track.playlist_tab.clear_next()
# Update headers
self.update_headers()