From bf2146567142c79a55d485a55fb44582927c001c Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 16 May 2024 13:14:39 +0200 Subject: [PATCH] Version R2.14l --- bin/Code/Kibitzers/WKibEngine.py | 2 +- bin/Code/Leagues/WLeagueWorker.py | 13 +++++++------ bin/Code/MainWindow/WBase.py | 8 ++++---- bin/Code/Util.py | 4 ++-- bin/Code/__init__.py | 2 +- bin/bug.log | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/bin/Code/Kibitzers/WKibEngine.py b/bin/Code/Kibitzers/WKibEngine.py index bd540f3e..8cc20e44 100644 --- a/bin/Code/Kibitzers/WKibEngine.py +++ b/bin/Code/Kibitzers/WKibEngine.py @@ -34,7 +34,7 @@ def __init__(self, cpu): else: rotulo = _("Alternatives") - delegado = Delegados.EtiquetaPOS(True, siLineas=False) if self.with_figurines else None + delegado = Delegados.EtiquetaPOS(True, siLineas=False, siFondo=True) if self.with_figurines else None delegado_pgn = Delegados.LinePGN() if self.with_figurines else None self.color_done = QTUtil.qtColorRGB(231, 244, 254) diff --git a/bin/Code/Leagues/WLeagueWorker.py b/bin/Code/Leagues/WLeagueWorker.py index 21051a0a..15fcbe75 100644 --- a/bin/Code/Leagues/WLeagueWorker.py +++ b/bin/Code/Leagues/WLeagueWorker.py @@ -234,12 +234,13 @@ def procesa_match(self): self.xengine[side].set_gui_dispatch(self.gui_dispatch) bk = rv.book - if not Util.exist_file(bk): - bk = None - if bk == "*": - bk = self.torneo.book() - if bk == "-": # Puede que el torneo tenga "-" - bk = None + if bk: + if not Util.exist_file(bk): + bk = None + if bk == "*": + bk = self.torneo.book() + if bk == "-": # Puede que el torneo tenga "-" + bk = None if bk: self.book[side] = Books.Book("P", bk, bk, True) self.book[side].polyglot() diff --git a/bin/Code/MainWindow/WBase.py b/bin/Code/MainWindow/WBase.py index eb47b850..62af05f1 100644 --- a/bin/Code/MainWindow/WBase.py +++ b/bin/Code/MainWindow/WBase.py @@ -683,7 +683,7 @@ def put_captures(self, dic): value = {"q": 1, "r": 2, "b": 3, "n": 4, "p": 5} - def xshow(max_num, tp, li, lb, num): + def xshow(tp, li, lb, num): html = "%+d" % num if num else "" li.sort(key=lambda x: value[x.lower()]) for n, pz in enumerate(li): @@ -694,9 +694,9 @@ def xshow(max_num, tp, li, lb, num): html += '' % (tp, pz.lower()) lb.set_text(html) - max_num = self.lb_capt_white.width() // 27 - xshow(max_num, "b", d[True], self.lb_capt_white, xvpz if xvpz > 0 else 0) - xshow(max_num, "w", d[False], self.lb_capt_black, -xvpz if xvpz < 0 else 0) + # max_num = self.lb_capt_white.width() // 27 + xshow("b", d[True], self.lb_capt_white, xvpz if xvpz > 0 else 0) + xshow("w", d[False], self.lb_capt_black, -xvpz if xvpz < 0 else 0) if self.lb_capt_white.isVisible(): self.lb_capt_white.show() self.lb_capt_black.show() diff --git a/bin/Code/Util.py b/bin/Code/Util.py index 176c4679..197782ce 100644 --- a/bin/Code/Util.py +++ b/bin/Code/Util.py @@ -79,11 +79,11 @@ def filesize(file: str) -> int: def exist_file(file: str) -> bool: - return filesize(file) >= 0 + return filesize(file) >= 0 if file else False def exist_folder(folder: str) -> bool: - return os.path.isdir(folder) + return os.path.isdir(folder) if folder else False def file_copy(origin: str, destino: str) -> bool: diff --git a/bin/Code/__init__.py b/bin/Code/__init__.py index 4ea7430d..e8d8b8ed 100644 --- a/bin/Code/__init__.py +++ b/bin/Code/__init__.py @@ -99,7 +99,7 @@ def relative_root(path): BASE_VERSION = "B" # Para el control de updates que necesitan reinstalar entero -VERSION = "R 2.14k" +VERSION = "R 2.14l" DEBUG = False DEBUG_ENGINES = False diff --git a/bin/bug.log b/bin/bug.log index eefc2cd2..eabf73a0 100644 --- a/bin/bug.log +++ b/bin/bug.log @@ -1 +1 @@ -Version R 2.14k +Version R 2.14l