From cdc310dcb64fd285078e5eb9bd6cd903e9090866 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Nov 2009 01:23:07 -0400 Subject: [PATCH] if HUD is told to create for a layout that doesn't exist in the config file, it will pick a 9 or 10 max layout and use it's positions, which you can then move the windows around, and save, and it should be saved in the right spot. --- pyfpdb/Hud.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 38402f8f..60fc29be 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -455,6 +455,9 @@ class Hud: # Need range here, not xrange -> need the actual list adj = range(0, self.max + 1) # default seat adjustments = no adjustment # does the user have a fav_seat? + if self.max not in config.supported_sites[self.table.site].layout: + sys.stderr.write("No layout found for %d-max games for site %s\n" % (self.max, self.table.site) ) + return adj if self.table.site != None and int(config.supported_sites[self.table.site].layout[self.max].fav_seat) > 0: try: fav_seat = config.supported_sites[self.table.site].layout[self.max].fav_seat @@ -494,6 +497,10 @@ class Hud: sys.stderr.write("------------------------------------------------------------\nCreating hud from hand %s\n" % hand) adj = self.adj_seats(hand, config) loc = self.config.get_locations(self.table.site, self.max) + if loc is None and self.max != 10: + loc = self.config.get_locations(self.table.site, 10) + if loc is None and self.max != 9: + loc = self.config.get_locations(self.table.site, 9) # create the stat windows for i in xrange(1, self.max + 1):