diff --git a/app/playlists.py b/app/playlists.py index 1b76be2..769f748 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -207,11 +207,14 @@ class PlaylistTab(QTableView): self.setDragDropMode(QAbstractItemView.DragDropMode.InternalMove) self.setDragDropOverwriteMode(False) self.setAcceptDrops(True) + # Set our custom style - this draws the drop indicator across the whole row self.setStyle(PlaylistStyle()) + # We will enable dragging when rows are selected. Disabling it # here means we can click and drag to select rows. self.setDragEnabled(False) + # Prepare for context menu self.menu = QMenu() self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) @@ -229,12 +232,14 @@ class PlaylistTab(QTableView): # Load playlist rows self.setModel(self.proxy_model) self._set_column_widths() + # Stretch last column *after* setting column widths which is # *much* faster h_header = self.horizontalHeader() if isinstance(h_header, QHeaderView): h_header.sectionResized.connect(self._column_resize) h_header.setStretchLastSection(True) + # Setting ResizeToContents causes screen flash on load self.resize_rows() @@ -920,12 +925,6 @@ class PlaylistTab(QTableView): Implement spanning of cells, initiated by signal """ - # Commented out as too noisy - # log.debug( - # f"_span_cells({playlist_id=}, {row=}, " - # f"{column=}, {rowSpan=}, {columnSpan=}) {self.playlist_id=}" - # ) - if playlist_id != self.playlist_id: return