Set playlist column widths before populating playlist
Big speed improvment. Loading a 540 line playlist went from 0.445s to 0.264s.
This commit is contained in:
parent
9ac2911a55
commit
3a612558e4
@ -787,6 +787,9 @@ class PlaylistTab(QTableWidget):
|
|||||||
# Clear playlist
|
# Clear playlist
|
||||||
self.setRowCount(0)
|
self.setRowCount(0)
|
||||||
|
|
||||||
|
# Set widths
|
||||||
|
self._set_column_widths(session)
|
||||||
|
|
||||||
# Get played tracks
|
# Get played tracks
|
||||||
played_rows = self._get_played_rows(session)
|
played_rows = self._get_played_rows(session)
|
||||||
|
|
||||||
@ -818,9 +821,6 @@ class PlaylistTab(QTableWidget):
|
|||||||
if row0_item:
|
if row0_item:
|
||||||
self.scrollToItem(row0_item, QAbstractItemView.ScrollHint.PositionAtTop)
|
self.scrollToItem(row0_item, QAbstractItemView.ScrollHint.PositionAtTop)
|
||||||
|
|
||||||
# Set widths
|
|
||||||
self._set_column_widths(session)
|
|
||||||
|
|
||||||
# Queue up time calculations to take place after UI has
|
# Queue up time calculations to take place after UI has
|
||||||
# updated
|
# updated
|
||||||
self._update_start_end_times(session)
|
self._update_start_end_times(session)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user