From 770ba309da86d2d18a2586658bef111e89f8b708 Mon Sep 17 00:00:00 2001 From: Gerko de Roo Date: Sun, 22 Aug 2010 00:02:04 +0200 Subject: [PATCH] Handling table change in tourney. Though I pushed this ages ago, was triggered by the mailing list. must have been in a different tree. --- pyfpdb/Hud.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index c394108c..93200bcb 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -466,11 +466,20 @@ class Hud: return False # anyone know how to do this in unix, or better yet, trap the X11 error that is triggered when executing the get_origin() for a closed window? if self.table.gdkhandle is not None: + updateFlag = False + actual_seat = self.get_actual_seat(self.config.supported_sites[self.table.site].screen_name) + if self.table.hud != actual_seat: + self.table.hud = actual_seat + updateFlag = True + # dont know what the intention of table.hud was, so misusing the variable here (x, y) = self.table.gdkhandle.get_origin() if self.table.x != x or self.table.y != y: self.table.x = x self.table.y = y + # self.main_window.move(x, y) self.main_window.move(x + self.site_params['xshift'], y + self.site_params['yshift']) + updateFlag = True + if updateFlag: adj = self.adj_seats(self.hand, self.config) loc = self.config.get_locations(self.table.site, self.max) # TODO: is stat_windows getting converted somewhere from a list to a dict, for no good reason?