parent
06efaf2ba2
commit
2186b3eb09
@ -577,6 +577,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
dlg.exec()
|
dlg.exec()
|
||||||
if dlg.plid:
|
if dlg.plid:
|
||||||
p = Playlists.get_by_id(session=session, playlist_id=dlg.plid)
|
p = Playlists.get_by_id(session=session, playlist_id=dlg.plid)
|
||||||
|
p.mark_open(session)
|
||||||
self.create_playlist_tab(session, p)
|
self.create_playlist_tab(session, p)
|
||||||
|
|
||||||
def select_next_row(self) -> None:
|
def select_next_row(self) -> None:
|
||||||
|
|||||||
@ -245,7 +245,7 @@ class PlaylistTab(QTableWidget):
|
|||||||
def closeEvent(self, event) -> None:
|
def closeEvent(self, event) -> None:
|
||||||
"""Save column widths"""
|
"""Save column widths"""
|
||||||
|
|
||||||
with Session() as session: # checked
|
with Session() as session:
|
||||||
for column in range(self.columnCount()):
|
for column in range(self.columnCount()):
|
||||||
width = self.columnWidth(column)
|
width = self.columnWidth(column)
|
||||||
name = f"playlist_col_{str(column)}_width"
|
name = f"playlist_col_{str(column)}_width"
|
||||||
@ -253,6 +253,10 @@ class PlaylistTab(QTableWidget):
|
|||||||
if record.f_int != self.columnWidth(column):
|
if record.f_int != self.columnWidth(column):
|
||||||
record.update(session, {'f_int': width})
|
record.update(session, {'f_int': width})
|
||||||
|
|
||||||
|
# Record playlist as closed
|
||||||
|
playlist = Playlists.get_by_id(session, self.playlist_id)
|
||||||
|
playlist.close(session)
|
||||||
|
|
||||||
event.accept()
|
event.accept()
|
||||||
|
|
||||||
def clear_next(self, session) -> None:
|
def clear_next(self, session) -> None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user