Compare commits
No commits in common. "c9c47c3133a11c6693655b402601c154d18f07df" and "b30f2d5cc3b772ebb0eb7ed3d04a79db7b57a94a" have entirely different histories.
c9c47c3133
...
b30f2d5cc3
@ -1210,6 +1210,14 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
# If there's currently a track playing, fade it.
|
# If there's currently a track playing, fade it.
|
||||||
self.stop_playing(fade=True)
|
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.
|
# Move next track to current track.
|
||||||
# stop_playing() above has called end_of_track_actions()
|
# stop_playing() above has called end_of_track_actions()
|
||||||
# which will have populated self.previous_track
|
# which will have populated self.previous_track
|
||||||
@ -1224,7 +1232,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Set current track playlist_tab colour
|
# Set current track playlist_tab colour
|
||||||
current_tab = self.current_track.playlist_tab
|
|
||||||
if current_tab:
|
if current_tab:
|
||||||
self.set_tab_colour(
|
self.set_tab_colour(
|
||||||
current_tab, QColor(Config.COLOUR_CURRENT_TAB))
|
current_tab, QColor(Config.COLOUR_CURRENT_TAB))
|
||||||
@ -1250,6 +1257,17 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
# Disable play next controls
|
# Disable play next controls
|
||||||
self.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
|
# Update headers
|
||||||
self.update_headers()
|
self.update_headers()
|
||||||
|
|
||||||
|
|||||||
@ -357,11 +357,6 @@ class PlaylistTab(QTableWidget):
|
|||||||
if update_next or update_current:
|
if update_next or update_current:
|
||||||
self.musicmuster.update_headers()
|
self.musicmuster.update_headers()
|
||||||
|
|
||||||
if update_current:
|
|
||||||
self._set_row_colour_current(row)
|
|
||||||
elif update_next:
|
|
||||||
self._set_row_colour_next(row)
|
|
||||||
|
|
||||||
self.clear_selection()
|
self.clear_selection()
|
||||||
|
|
||||||
def closeEditor(self,
|
def closeEditor(self,
|
||||||
@ -601,20 +596,14 @@ class PlaylistTab(QTableWidget):
|
|||||||
|
|
||||||
def play_ended(self) -> None:
|
def play_ended(self) -> None:
|
||||||
"""
|
"""
|
||||||
Called by musicmuster when play has ended.
|
Called by musicmuster when play has ended
|
||||||
|
|
||||||
current_track points to track that's just finished
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
row_number = self._get_current_track_row_number()
|
row_number = self._get_current_track_row_number()
|
||||||
if row_number is None:
|
if not row_number:
|
||||||
return
|
return
|
||||||
|
|
||||||
self._set_row_colour_default(row_number)
|
self._set_row_colour_default(row_number)
|
||||||
self.clear_selection()
|
self.clear_selection()
|
||||||
self._set_row_last_played_time(
|
|
||||||
row_number, self.musicmuster.current_track.start_time)
|
|
||||||
|
|
||||||
with Session() as session:
|
with Session() as session:
|
||||||
self._set_row_note_colour(session, row_number)
|
self._set_row_note_colour(session, row_number)
|
||||||
|
|
||||||
@ -704,14 +693,6 @@ class PlaylistTab(QTableWidget):
|
|||||||
# Queue up time calculations to take place after UI has
|
# Queue up time calculations to take place after UI has
|
||||||
# updated
|
# updated
|
||||||
self._update_start_end_times(session)
|
self._update_start_end_times(session)
|
||||||
# It's possible that the current/next tracks are in this
|
|
||||||
# playlist, so check and set.
|
|
||||||
current_row = self._get_current_track_row_number()
|
|
||||||
if current_row is not None:
|
|
||||||
self._set_row_colour_current(current_row)
|
|
||||||
next_row = self._get_next_track_row_number()
|
|
||||||
if next_row is not None:
|
|
||||||
self._set_row_colour_next(next_row)
|
|
||||||
# Needed to wrap notes column correctly - add to event queue so
|
# Needed to wrap notes column correctly - add to event queue so
|
||||||
# that it's processed after list is populated
|
# that it's processed after list is populated
|
||||||
QTimer.singleShot(0, self.tab_visible)
|
QTimer.singleShot(0, self.tab_visible)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user