Consistently use clear_next() to clear next track
This commit is contained in:
parent
2422adea21
commit
ad071bb74b
@ -531,7 +531,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
# Attempt to close next track playlist
|
# Attempt to close next track playlist
|
||||||
if self.tabPlaylist.widget(tab_index) == self.next_track.playlist_tab:
|
if self.tabPlaylist.widget(tab_index) == self.next_track.playlist_tab:
|
||||||
self.next_track.playlist_tab.mark_unnext()
|
self.next_track.playlist_tab.clear_next()
|
||||||
|
|
||||||
# Record playlist as closed and update remaining playlist tabs
|
# Record playlist as closed and update remaining playlist tabs
|
||||||
with Session() as session:
|
with Session() as session:
|
||||||
@ -1272,7 +1272,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.current_track.playlist_tab != self.visible_playlist_tab()
|
self.current_track.playlist_tab != self.visible_playlist_tab()
|
||||||
and self.previous_track.plr_id
|
and self.previous_track.plr_id
|
||||||
):
|
):
|
||||||
self.previous_track.playlist_tab.reset_next()
|
self.previous_track.playlist_tab.clear_next()
|
||||||
|
|
||||||
# Update headers
|
# Update headers
|
||||||
self.update_headers()
|
self.update_headers()
|
||||||
@ -1552,7 +1552,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
# Discard now-incorrect next_track PlaylistTrack and tell
|
# Discard now-incorrect next_track PlaylistTrack and tell
|
||||||
# playlist_tab too
|
# playlist_tab too
|
||||||
self.next_track.playlist_tab.reset_next()
|
self.next_track.playlist_tab.clear_next()
|
||||||
self.clear_next()
|
self.clear_next()
|
||||||
|
|
||||||
# Populate self.next_track
|
# Populate self.next_track
|
||||||
|
|||||||
@ -712,7 +712,7 @@ class PlaylistTab(QTableWidget):
|
|||||||
for row in sorted(row_numbers, reverse=True):
|
for row in sorted(row_numbers, reverse=True):
|
||||||
self.removeRow(row)
|
self.removeRow(row)
|
||||||
|
|
||||||
def reset_next(self) -> None:
|
def clear_next(self) -> None:
|
||||||
"""
|
"""
|
||||||
Unmark next track
|
Unmark next track
|
||||||
"""
|
"""
|
||||||
@ -973,7 +973,7 @@ class PlaylistTab(QTableWidget):
|
|||||||
# Unmark as next
|
# Unmark as next
|
||||||
if next_row:
|
if next_row:
|
||||||
self._add_context_menu("Unmark as next track",
|
self._add_context_menu("Unmark as next track",
|
||||||
self.reset_next)
|
self.clear_next)
|
||||||
|
|
||||||
# ----------------------
|
# ----------------------
|
||||||
self.menu.addSeparator()
|
self.menu.addSeparator()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user