From e1cdfcc712614d4616220456d7a4bc50be955443 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 5 Dec 2023 08:42:27 -0300 Subject: [PATCH] [QR lib][Fixed] Project options not preserved i.e. set_text_variables failing --- CHANGELOG.md | 1 + kibot/out_qr_lib.py | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecae0f0f..0b88194a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -117,6 +117,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - QR Lib: - When used from the preflight the name of the file changed to the name of a temporal, generating problems with the plot outputs, like pcb_print + - Project options not preserved, i.e. set_text_variables failing ## [1.6.3] - 2023-06-26 diff --git a/kibot/out_qr_lib.py b/kibot/out_qr_lib.py index 60316ecc..c89230c1 100644 --- a/kibot/out_qr_lib.py +++ b/kibot/out_qr_lib.py @@ -398,6 +398,8 @@ class QR_LibOptions(BaseOptions): f.write(dumps(separated)) f.write('\n') tmp_pcb = f.name + # Also copy the project + GS.copy_project(tmp_pcb) # Reload it logger.debug('- Loading the temporal PCB') load_board(tmp_pcb, forced=True) @@ -405,19 +407,9 @@ class QR_LibOptions(BaseOptions): logger.debug('- Replacing the old PCB') os.remove(tmp_pcb) GS.make_bkp(GS.pcb_file) - prl = None - if GS.ki6: - # KiCad 6 is destroying the PRL ... - prl_name = GS.pcb_no_ext+'.kicad_prl' - if os.path.isfile(prl_name): - with open(prl_name, 'rt') as f: - prl = f.read() GS.board.Save(GS.pcb_file) # After saving the file the name isn't changed, we must force it!!! GS.board.SetFileName(GS.pcb_file) - if prl: - with open(prl_name, 'wt') as f: - f.write(prl) def update_symbol(self, name, c_name, sexp, qr): logger.debug('- Updating QR symbol: '+name)