From 8d2b315fc8bb93f8c42ade68eb340b5fddb7dce5 Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 21 Nov 2009 11:11:31 +0800 Subject: [PATCH] Fix PL in Graph viewer Grapher still doesn't support the cap games, that code could use some cleanout. --- pyfpdb/GuiGraphViewer.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pyfpdb/GuiGraphViewer.py b/pyfpdb/GuiGraphViewer.py index 670554e7..e6d0c6d2 100644 --- a/pyfpdb/GuiGraphViewer.py +++ b/pyfpdb/GuiGraphViewer.py @@ -216,6 +216,7 @@ class GuiGraphViewer (threading.Thread): #nametest = nametest.replace("L", "") lims = [int(x) for x in limits if x.isdigit()] + potlims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'pl'] nolims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'nl'] limittest = "and ( (gt.limitType = 'fl' and gt.bigBlind in " # and ( (limit and bb in()) or (nolimit and bb in ()) ) @@ -226,6 +227,14 @@ class GuiGraphViewer (threading.Thread): limittest = limittest + blindtest + ' ) ' else: limittest = limittest + '(-1) ) ' + limittest = limittest + " or (gt.limitType = 'pl' and gt.bigBlind in " + if potlims: + blindtest = str(tuple(potlims)) + blindtest = blindtest.replace("L", "") + blindtest = blindtest.replace(",)",")") + limittest = limittest + blindtest + ' ) ' + else: + limittest = limittest + '(-1) ) ' limittest = limittest + " or (gt.limitType = 'nl' and gt.bigBlind in " if nolims: blindtest = str(tuple(nolims)) @@ -234,6 +243,7 @@ class GuiGraphViewer (threading.Thread): limittest = limittest + blindtest + ' ) )' else: limittest = limittest + '(-1) ) )' + if type == 'ring': limittest = limittest + " and gt.type = 'ring' " elif type == 'tour':