parent
253550b490
commit
c1d2fcd8cd
@ -486,10 +486,14 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
record.update(session, {"f_int": splitter_bottom})
|
||||
|
||||
# Save tab number of open playlists
|
||||
open_playlist_ids: dict[int, int] = {}
|
||||
for idx in range(self.tabPlaylist.count()):
|
||||
playlist_id = self.tabPlaylist.widget(idx).playlist_id
|
||||
open_playlist_ids[self.tabPlaylist.widget(idx).playlist_id] = idx
|
||||
Playlists.clear_tabs(session, list(open_playlist_ids.keys()))
|
||||
for playlist_id, idx in open_playlist_ids.items():
|
||||
playlist = session.get(Playlists, playlist_id)
|
||||
if playlist:
|
||||
log.debug(f"Set {playlist=} tab to {idx=}")
|
||||
playlist.tab = idx
|
||||
session.flush()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user