From 4714364517af4e1f3f83190db11360b2ef353e1c Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Wed, 27 Mar 2024 08:47:11 +0000 Subject: [PATCH] Resize rows on copy/paste Fixes #226 --- app/musicmuster.py | 3 ++- app/playlists.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/musicmuster.py b/app/musicmuster.py index e782378..8864f46 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -407,7 +407,7 @@ class Window(QMainWindow, Ui_MainWindow): self.update_headers() def clear_selection(self) -> None: - """Clear selected row""" + """Clear row selection""" # Unselect any selected rows if self.active_tab(): @@ -1068,6 +1068,7 @@ class Window(QMainWindow, Ui_MainWindow): self.move_source_model.move_rows_between_playlists( self.move_source_rows, destination_row, to_playlist_model.playlist_id ) + self.active_tab().resize_rows() self.active_tab().clear_selection() def play_next(self, position: Optional[float] = None) -> None: diff --git a/app/playlists.py b/app/playlists.py index 1a3d871..170fc27 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -726,7 +726,6 @@ class PlaylistTab(QTableView): if playlist_id and playlist_id != self.playlist_id: return - # self.resizeRowsToContents() # Suggestion from phind.com def resize_row(row, count=1): row_count = self.source_model.rowCount()