From 10486af51a157b835f676ca8d2671e3fd3dbdca6 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 15 Nov 2021 15:56:33 -0300 Subject: [PATCH] Fixed KiCost variants: when setting a field hat doesn't exist Fixes #105 --- CHANGELOG.md | 2 ++ kibot/kicad/v5_sch.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d23329d5..1ac2ebf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 (INTI-CMNB/kibot_variants_arduprog#4) - Makefile: %VALUE not expanded in the directory targets. - KiCost variants: empty DNF fields shouldn't be excluded. (#101) +- KiCost variants: problems when setting a field in a variant that doesn't + exist when no variant is selected. (#105) ## [0.11.0] - 2021-04-25 diff --git a/kibot/kicad/v5_sch.py b/kibot/kicad/v5_sch.py index 2cc2f8cd..399b663c 100644 --- a/kibot/kicad/v5_sch.py +++ b/kibot/kicad/v5_sch.py @@ -726,6 +726,15 @@ class SchematicField(object): def __init__(self): super().__init__() + self.horizontal = True # H -> True, V -> False + self.x = 0 + self.y = 0 + self.size = 50 + self.flags = '0001' + self.hjustify = 'C' + self.vjustify = 'C' + self.italic = 'N' + self.bold = 'N' @staticmethod def parse(line, f):