parent
c69aefef92
commit
d5d4361ec5
@ -338,6 +338,7 @@ class PlaylistTracks(Base):
|
|||||||
f"PlaylistTracks.playlist_id == {from_playlist_id}, "
|
f"PlaylistTracks.playlist_id == {from_playlist_id}, "
|
||||||
f"PlaylistTracks.row == {row}"
|
f"PlaylistTracks.row == {row}"
|
||||||
)
|
)
|
||||||
|
return
|
||||||
record.playlist_id = to_playlist_id
|
record.playlist_id = to_playlist_id
|
||||||
record.row = new_row
|
record.row = new_row
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|||||||
@ -423,6 +423,9 @@ class PlaylistTab(QTableWidget):
|
|||||||
# on its specified row, only that it will be above
|
# on its specified row, only that it will be above
|
||||||
# larger-numbered row items, and below lower-numbered ones.
|
# larger-numbered row items, and below lower-numbered ones.
|
||||||
|
|
||||||
|
# That means we need to re-save ourself once loaded to ensure
|
||||||
|
# database is correct.
|
||||||
|
|
||||||
# First, save our id for the future
|
# First, save our id for the future
|
||||||
self.id = playlist_db.id
|
self.id = playlist_db.id
|
||||||
self.name = playlist_db.name
|
self.name = playlist_db.name
|
||||||
@ -449,6 +452,7 @@ class PlaylistTab(QTableWidget):
|
|||||||
scroll_to = self.item(0, self.COL_INDEX)
|
scroll_to = self.item(0, self.COL_INDEX)
|
||||||
self.scrollToItem(scroll_to, QAbstractItemView.PositionAtTop)
|
self.scrollToItem(scroll_to, QAbstractItemView.PositionAtTop)
|
||||||
|
|
||||||
|
self._save_playlist(session)
|
||||||
self._repaint()
|
self._repaint()
|
||||||
|
|
||||||
def repaint(self):
|
def repaint(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user