diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2011-09-29 14:52:41 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2011-09-29 14:52:41 (GMT) |
commit | bec5befe53747d1ddabcfe5742380b04ed81062e (patch) | |
tree | 95343c7eac5d5705d8f5e014a8c9206d1463d2c4 /cardlist.py | |
parent | d4a55ac6afd79769ef0f659e0c9098a4be3f55eb (diff) |
Reload the cardlist when the game is changed - SL #3137
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'cardlist.py')
-rw-r--r-- | cardlist.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cardlist.py b/cardlist.py index 653c357..66e5f56 100644 --- a/cardlist.py +++ b/cardlist.py @@ -47,6 +47,7 @@ class CardList(gtk.EventBox): self.current_game_key = None self.model = None self.pair_list_modified = False + self.game_loaded = False self.vbox = gtk.VBox(False) @@ -65,6 +66,9 @@ class CardList(gtk.EventBox): self.show_all() def load_game(self, game): + if self.game_loaded: + return + self.get_window().freeze_updates() self.model = game.model self.current_game_key = self.model.data['game_file'] game_pairs = self.model.pairs @@ -101,9 +105,11 @@ class CardList(gtk.EventBox): game_pairs[key].props.bchar, aimg, bimg, asnd, bsnd, game_pairs[key].props.aspeak, game_pairs[key].props.bspeak, False, load=True) + self.get_window().thaw_updates() self.emit('update-create-toolbar', self.model.data['name'], self.model.data['equal_pairs'], self.model.data['divided']) + self.game_loaded = True def update_model(self, game_model): game_model.pairs = {} |