Don't scroll to top without a row

This commit is contained in:
Keith Edmunds 2022-11-11 21:06:15 +00:00
parent a0c1dad2f5
commit 6339326947

View File

@ -737,7 +737,7 @@ class PlaylistTab(QTableWidget):
next_row = self._find_next_track_row(session, search_from)
if next_row:
self._set_next(session, next_row)
self._scroll_to_top(next_row)
self._scroll_to_top(next_row)
# Update display
self.update_display(session)
@ -1727,6 +1727,9 @@ class PlaylistTab(QTableWidget):
top.
"""
if row is None:
return
padding_required = Config.SCROLL_TOP_MARGIN
top_row = row