mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Do not change selection when a game is updated (Closes #2144)
This commit is contained in:
parent
7e9d00d670
commit
47ecc41949
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue