From 2dc32072018ea316e4523abe7a26f6e34bd775cc Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 13 Feb 2023 13:45:19 -0300 Subject: [PATCH] [KiCad 7] Added support for the new VECTOR_FP_3DMODEL --- kibot/out_base.py | 12 ++++++------ kibot/out_base_3d.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kibot/out_base.py b/kibot/out_base.py index 73b7141f..969ba189 100644 --- a/kibot/out_base.py +++ b/kibot/out_base.py @@ -520,8 +520,8 @@ class VariantOptions(BaseOptions): m3d.m_Filename = new_model[i] self.undo_3d_models_rep[c.ref] = replaced # Push the models back - for model in models_l: - models.push_front(model) + for model in reversed(models_l): + models.append(model) def undo_3d_models_rename(self, board): """ Restores the file name for any renamed 3D module """ @@ -539,8 +539,8 @@ class VariantOptions(BaseOptions): if replaced: m3d.m_Filename = replaced[i] # Push the models back - for model in models_l: - models.push_front(model) + for model in reversed(models_l): + models.append(model) # Reset the list of changes self.undo_3d_models = {} self.undo_3d_models_rep = {} @@ -585,8 +585,8 @@ class VariantOptions(BaseOptions): if c and c.included and not c.fitted: models = m.Models() restore = self.rem_models.pop(0) - for model in restore: - models.push_front(model) + for model in reversed(restore): + models.append(model) def apply_list_of_3D_models(self, enable, slots, m, var): # Disable the unused models adding bogus text to the end diff --git a/kibot/out_base_3d.py b/kibot/out_base_3d.py index ab09790d..1cfe1b69 100644 --- a/kibot/out_base_3d.py +++ b/kibot/out_base_3d.py @@ -253,8 +253,8 @@ class Base3DOptions(VariantOptions): logger.debug('- Modifying models with text vars') models_replaced = True # Push the models back - for model in models_l: - models.push_front(model) + for model in reversed(models_l): + models.append(model) if downloaded: logger.warning(W_DOWN3D+' {} 3D models downloaded'.format(len(downloaded))) return models_replaced if not is_copy_mode else list(source_models)