Compare commits
No commits in common. "fa52b7ffafea04b6dc09eb31d10a2898441ccff6" and "f2d01e003d05a518051b7aeb4ab9357d845480d5" have entirely different histories.
fa52b7ffaf
...
f2d01e003d
@ -201,11 +201,10 @@ class Playlists(dbtables.PlaylistsTable):
|
||||
update(Playlists).where((Playlists.id.in_(playlist_ids))).values(tab=None)
|
||||
)
|
||||
|
||||
def close(self, session: Session) -> None:
|
||||
def close(self) -> None:
|
||||
"""Mark playlist as unloaded"""
|
||||
|
||||
self.open = False
|
||||
session.commit()
|
||||
|
||||
@classmethod
|
||||
def create_playlist_from_template(
|
||||
|
||||
@ -496,6 +496,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
if playlist:
|
||||
log.debug(f"Set {playlist=} tab to {idx=}")
|
||||
playlist.tab = idx
|
||||
session.flush()
|
||||
|
||||
# Save current tab
|
||||
record = settings["active_tab"]
|
||||
@ -532,7 +533,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
with db.Session() as session:
|
||||
playlist = session.get(Playlists, closing_tab_playlist_id)
|
||||
if playlist:
|
||||
playlist.close(session)
|
||||
playlist.close()
|
||||
|
||||
# Close playlist and remove tab
|
||||
self.tabPlaylist.widget(tab_index).close()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user