Mercurial > libervia-web
diff browser_side/panels.py @ 167:9441893e8f37
browser side: fixed tarot game, radio collective double panel issue
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 09 Jan 2013 22:02:00 +0100 |
parents | 9763dec220ed |
children | d97b0cba8b04 |
line wrap: on
line diff
--- a/browser_side/panels.py Wed Jan 09 01:20:38 2013 +0100 +++ b/browser_side/panels.py Wed Jan 09 22:02:00 2013 +0100 @@ -771,10 +771,16 @@ def startGame(self, game_type, referee, players): """Configure the chat window to start a game""" if game_type=="Tarot": + if hasattr(self, "tarot_panel"): + return self.tarot_panel = CardPanel(self, referee, players, self.nick) self.vpanel.insert(self.tarot_panel, 0) self.vpanel.setCellHeight(self.tarot_panel, self.tarot_panel.getHeight()) elif game_type=="RadioCol": + #XXX: We can have double panel if we join quickly enough to have the group chat start signal + # on invitation + the one triggered on room join + if hasattr(self, "radiocol_panel"): + return self.radiocol_panel = RadioColPanel(self, referee, self.nick) self.vpanel.insert(self.radiocol_panel, 0) self.vpanel.setCellHeight(self.radiocol_panel, self.radiocol_panel.getHeight())