Do not change selection when a game is updated (Closes #2144)

This commit is contained in:
Mathieu Comandon 2019-11-14 21:06:30 -08:00
parent 7e9d00d670
commit 47ecc41949
2 changed files with 2 additions and 4 deletions

View file

@ -727,10 +727,6 @@ class LutrisWindow(Gtk.ApplicationWindow):
self.game_store.update_game_by_id(game.id)
except ValueError:
self.game_store.add_game_by_id(game.id)
self.view.set_selected_game(game.id)
if game.is_installed:
self.game_selection_changed(None, game)
return True
def on_search_games_fire(self, value):

View file

@ -1,3 +1,4 @@
"""Grid view for the main window"""
# pylint: disable=no-member
from gi.repository import Gtk
from lutris.gui.views.base import GameView
@ -44,6 +45,7 @@ class GameGridView(Gtk.IconView, GameView):
return self.get_model().get_iter(self.current_path)
def set_selected_game(self, game_id):
"""Select a game referenced by its ID in the view"""
row = self.game_store.get_row_by_id(game_id, filtered=True)
if row:
self.select_path(row.path)