Resize rows on copy/paste

Fixes #226
This commit is contained in:
Keith Edmunds 2024-03-27 08:47:11 +00:00
parent 056c66ebec
commit 4714364517
2 changed files with 2 additions and 2 deletions

View File

@ -407,7 +407,7 @@ class Window(QMainWindow, Ui_MainWindow):
self.update_headers() self.update_headers()
def clear_selection(self) -> None: def clear_selection(self) -> None:
"""Clear selected row""" """Clear row selection"""
# Unselect any selected rows # Unselect any selected rows
if self.active_tab(): if self.active_tab():
@ -1068,6 +1068,7 @@ class Window(QMainWindow, Ui_MainWindow):
self.move_source_model.move_rows_between_playlists( self.move_source_model.move_rows_between_playlists(
self.move_source_rows, destination_row, to_playlist_model.playlist_id self.move_source_rows, destination_row, to_playlist_model.playlist_id
) )
self.active_tab().resize_rows()
self.active_tab().clear_selection() self.active_tab().clear_selection()
def play_next(self, position: Optional[float] = None) -> None: def play_next(self, position: Optional[float] = None) -> None:

View File

@ -726,7 +726,6 @@ class PlaylistTab(QTableView):
if playlist_id and playlist_id != self.playlist_id: if playlist_id and playlist_id != self.playlist_id:
return return
# self.resizeRowsToContents()
# Suggestion from phind.com # Suggestion from phind.com
def resize_row(row, count=1): def resize_row(row, count=1):
row_count = self.source_model.rowCount() row_count = self.source_model.rowCount()