Fix bug moving unplayed tracks between playlists
This commit is contained in:
parent
c6a0e8c749
commit
91cef9e506
@ -877,18 +877,16 @@ class PlaylistModel(QAbstractTableModel):
|
||||
self.invalidate_rows(list(row_map.keys()))
|
||||
|
||||
def move_rows_between_playlists(
|
||||
self, from_rows: List[int], to_row_number: int, to_playlist_model: PlaylistModel
|
||||
self, from_rows: List[int], to_row_number: int, to_playlist_id: int
|
||||
) -> None:
|
||||
"""
|
||||
Move the playlist rows given to to_row and below of to_playlist.
|
||||
"""
|
||||
|
||||
log.info(
|
||||
f"move_rows_between_playlists({from_rows=}, {to_row_number=}, {to_playlist_model=}"
|
||||
f"move_rows_between_playlists({from_rows=}, {to_row_number=}, {to_playlist_id=}"
|
||||
)
|
||||
|
||||
to_playlist_id = to_playlist_model.playlist_id
|
||||
|
||||
# Row removal must be wrapped in beginRemoveRows ..
|
||||
# endRemoveRows and the row range must be contiguous. Process
|
||||
# the highest rows first so the lower row numbers are unchanged
|
||||
|
||||
Loading…
Reference in New Issue
Block a user