fixed '_on_back_to_current_song_button_clicked'

This commit is contained in:
Martin Wagner 2020-09-30 11:28:25 +02:00
parent 784a62cee2
commit 58bd394765

View File

@ -2846,6 +2846,7 @@ class PlaylistWindow(Gtk.Box):
self._scroll_to_selected_title() self._scroll_to_selected_title()
def _on_back_to_current_song_button_clicked(self, *args): def _on_back_to_current_song_button_clicked(self, *args):
self._treeview.set_cursor(Gtk.TreePath(len(self._store)), None, False) # set to invalid TreePath (needed to unset cursor)
for path, row in enumerate(self._store): for path, row in enumerate(self._store):
if row[9] == Pango.Weight.BOLD: if row[9] == Pango.Weight.BOLD:
self._selection.select_path(path) self._selection.select_path(path)