Skip to content

Commit 9212fae

Browse files
committed
Version R2.21-FP-7
1 parent aa074b8 commit 9212fae

File tree

12 files changed

+35
-25
lines changed

12 files changed

+35
-25
lines changed
-448 Bytes
Binary file not shown.

bin/Code/Board/Board.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ def lee(fich):
13701370
"R": lee("rival")
13711371
}
13721372

1373-
def mark_position_ext(self, a1, h8, tipo):
1373+
def mark_position_ext(self, a1, h8, tipo, ms=None):
13741374
self.check_leds()
13751375
lista = []
13761376
for pos_cuadro in range(4):
@@ -1392,10 +1392,12 @@ def quita():
13921392
del objeto
13931393
self.update()
13941394

1395-
QtCore.QTimer.singleShot(1600 if tipo == "C" else 500, quita)
1395+
if ms is None:
1396+
ms = 2000 if tipo == "C" else 500
1397+
QtCore.QTimer.singleShot(ms, quita)
13961398

1397-
def mark_position(self, a1):
1398-
self.mark_position_ext(a1, a1, "C")
1399+
def mark_position(self, a1, ms=None):
1400+
self.mark_position_ext(a1, a1, "R", ms=ms)
13991401

14001402
# def markError(self, a1):
14011403
# if a1:
@@ -2001,14 +2003,14 @@ def creaFlechaTutor(self, from_a1h8, to_a1h8, factor):
20012003
def ponFlechasTmp(self, lista, ms=None):
20022004
self.ponFlechas(lista)
20032005

2004-
def quitaFlechasTmp():
2006+
def quita_flechas_tmp():
20052007
self.remove_arrows()
20062008
if self.arrow_sc:
20072009
self.arrow_sc.show()
20082010

20092011
if ms is None:
20102012
ms = 2000 if len(lista) > 1 else 1400
2011-
QtCore.QTimer.singleShot(ms, quitaFlechasTmp)
2013+
QtCore.QTimer.singleShot(ms, quita_flechas_tmp)
20122014

20132015
def ponFlechas(self, lista):
20142016
if self.arrow_sc:

bin/Code/Databases/WDB_InfoMove.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def mousePressEvent(self, event):
3333
return
3434
event.ignore()
3535
menu = QTVarios.LCMenu(self)
36-
menu.opcion("copy", _("Copy"), Iconos.Clipboard())
36+
menu.opcion("copy", _("Copy"), Iconos.Copiar())
3737
menu.opcion("copy_sel", _("Copy to selected position"), Iconos.Clipboard())
3838
resp = menu.lanza()
3939
if resp == "copy":

bin/Code/MainWindow/WBase.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,17 +307,20 @@ def creaBloqueInformacion(self):
307307
self.configuration.set_property(self.lb_player_black, "black")
308308

309309
# # Capturas
310-
n_ancho_capt = (width_pgn - 12) // 2
311-
self.lb_capt_white = Controles.LB(self).relative_width(n_ancho_capt).set_wrap()
310+
self.lb_capt_white = Controles.LB(self).set_wrap()
312311
style = "QWidget { border-style: groove; border-width: 1px; border-color: LightGray; padding: 2px 0px 2px 0px;}"
313312
self.lb_capt_white.setStyleSheet(style)
314313

315-
self.lb_capt_black = Controles.LB(self).relative_width(n_ancho_capt).set_wrap()
314+
self.lb_capt_black = Controles.LB(self).set_wrap()
316315
self.lb_capt_black.setStyleSheet(style)
317316

318317
self.bt_capt = (Controles.PB(self, self.captures_symbol(), self.captures_mouse_pressed)
319318
.set_font_type(puntos=14)).relative_width(10)
320319

320+
n_ancho_capt = ((self.pgn.anchoColumnas() + 20) - self.bt_capt.width() - 2) // 2
321+
self.lb_capt_white.setFixedWidth(n_ancho_capt)
322+
self.lb_capt_black.setFixedWidth(n_ancho_capt)
323+
321324
# Relojes
322325
f = Controles.FontType(puntos=26, peso=500)
323326

@@ -507,11 +510,11 @@ def grid_pulsada_cabecera(self, grid, column):
507510
self.manager.configuration.x_pgn_width = n_ancho_pgn
508511
self.manager.configuration.graba()
509512
n_ancho_labels = n_ancho_pgn // 2
510-
self.lb_player_white.relative_width(n_ancho_labels)
511-
self.lb_player_black.relative_width(n_ancho_labels)
513+
self.lb_player_white.setFixedWidth(n_ancho_labels)
514+
self.lb_player_black.setFixedWidth(n_ancho_labels)
512515
n_ancho_labels -= self.bt_capt.width() // 2 + 2
513-
self.lb_capt_white.relative_width(n_ancho_labels)
514-
self.lb_capt_black.relative_width(n_ancho_labels)
516+
self.lb_capt_white.setFixedWidth(n_ancho_labels)
517+
self.lb_capt_black.setFixedWidth(n_ancho_labels)
515518

516519
def grid_tecla_control(self, grid, k, is_shift, is_control, is_alt):
517520
self.key_pressed("G", k)

bin/Code/Openings/POLAnalisisTree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def seleccionado(self):
224224
self.lb_analisis.set_text(data_item.game_figurines())
225225
lipv = data_item.list_pv()
226226
li_moves_childs = [xchild.move for xchild in data_item.dicHijos.values()]
227-
self.tabsAnalisis.panelOpening.goto_next_lipv(lipv, li_moves_childs)
227+
self.tabsAnalisis.wlines.goto_next_lipv(lipv, li_moves_childs)
228228

229229
def bt_update(self):
230230
self.wlines.active_tb(False)

bin/Code/Openings/POLBoard.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def mousePressEvent(self, event):
3232
return
3333
event.ignore()
3434
menu = QTVarios.LCMenu(self)
35-
menu.opcion("copy", _("Copy"), Iconos.Clipboard())
35+
menu.opcion("copy", _("Copy"), Iconos.Copiar())
3636
menu.opcion("copy_sel", _("Copy to selected position"), Iconos.Clipboard())
3737
resp = menu.lanza()
3838
if resp == "copy":
@@ -175,6 +175,9 @@ def cambiadoVentaja(self):
175175
self.setvalue("VENTAJA", self.cbVentaja.valor())
176176

177177
def cambiadoComentario(self):
178+
comment = self.emComentario.texto().strip()
179+
if "%csl" in comment or "%cal" in comment:
180+
self.board.show_lichess_graphics(comment)
178181
self.setvalue("COMENTARIO", self.emComentario.texto().strip())
179182

180183
def ajustaAncho(self):
@@ -273,6 +276,8 @@ def goto_move_num(self, pos):
273276
self.emComentario.set_text(comment)
274277

275278
self.board.set_position(position)
279+
if "%csl" in comment or "%cal" in comment:
280+
self.board.show_lichess_graphics(comment)
276281
if move:
277282
self.board.put_arrow_sc(move.from_sq, move.to_sq)
278283

bin/Code/Openings/WindowOpeningLine.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ def __init__(self, dbop):
121121
def active_tb(self, ok):
122122
self.tb.setEnabled(ok)
123123

124-
125124
def keyPressEvent(self, event):
126125
k = event.key()
127126
if 49 <= k <= 57:
@@ -998,9 +997,10 @@ def grid_tecla_control(self, grid, k, is_shift, is_control, is_alt):
998997
row, pos = self.glines.posActualN()
999998

1000999
if k == QtCore.Qt.Key_Left:
1001-
if pos > 1:
1000+
if pos >= 1:
10021001
if row % 2 == 0:
1003-
self.glines.goto(row + 1, pos - 1)
1002+
if pos > 1:
1003+
self.glines.goto(row + 1, pos - 1)
10041004
else:
10051005
self.glines.goto(row - 1, pos)
10061006
return
@@ -1032,7 +1032,7 @@ def grid_tecla_control(self, grid, k, is_shift, is_control, is_alt):
10321032
self.import_pastepgn(self.gamebase)
10331033

10341034
elif is_alt and QtCore.Qt.Key_1 <= k <= QtCore.Qt.Key_9:
1035-
self.shortcuts.launch_shortcut_with_alt(k-QtCore.Qt.Key_0)
1035+
self.shortcuts.launch_shortcut_with_alt(k - QtCore.Qt.Key_0)
10361036

10371037
def grid_doble_click(self, grid, row, o_column):
10381038
game = self.game_actual()

bin/Code/PlayAgainstEngine/ManagerPlayAgainstEngine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,9 +1043,9 @@ def help_current(self):
10431043
self.pon_toolbar()
10441044
self.current_helps += 1
10451045
if self.current_helps == 1:
1046-
self.board.mark_position(rm.from_sq)
1046+
self.board.mark_position(rm.from_sq, ms=2000)
10471047
else:
1048-
self.board.ponFlechasTmp(([rm.from_sq, rm.to_sq, True],))
1048+
self.board.ponFlechas(([rm.from_sq, rm.to_sq, True],))
10491049
if rm.promotion and rm.promotion.upper() != "Q":
10501050
dic = TrListas.dic_nom_pieces()
10511051
QTUtil2.temporary_message(self.main_window, dic[rm.promotion.upper()], 2.0)

bin/Code/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def startfile(path: str) -> bool:
7575
stdout=subprocess.DEVNULL,
7676
stderr=subprocess.DEVNULL)
7777
return True
78-
except Exception:
78+
except:
7979
return False
8080

8181

@@ -142,7 +142,7 @@ def relative_root(path):
142142

143143

144144
BASE_VERSION = "B" # Para el control de updates que necesitan reinstalar entero
145-
VERSION = "R 2.21-FP-6"
145+
VERSION = "R 2.21-FP-7"
146146
DEBUG = False
147147
DEBUG_ENGINES = False
148148

bin/OS/linux/uci_options.sqlite

-76 KB
Binary file not shown.

0 commit comments

Comments
 (0)