Avoid selected hidden rows when starting up.

This means you won't return to the hidden row *or* the running row; instead you will go to the 'Games' view on start-up.
This commit is contained in:
Daniel Johnson 2024-02-17 08:19:02 -05:00 committed by Mathieu Comandon
parent b840c1389f
commit 5aa976e3fa

View file

@ -462,11 +462,20 @@ class LutrisSidebar(Gtk.ListBox):
"""Selects the row for the category indicated by a category tuple,
like ('service', 'lutris')"""
selected_row_type, selected_row_id = value or ("category", "all")
for row in self.get_children():
children = list(self.get_children())
for row in children:
if row.type == selected_row_type and row.id == selected_row_id:
self.select_row(row)
if row.get_visible():
self.select_row(row)
return
break
for row in children:
if row.get_visible():
self.select_row(row)
return
def _filter_func(self, row):
def is_runner_visible(runner_name):
if runner_name not in self.runner_visibility_cache: