From 68c96385d313c990906267b4818492c09d256b56 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 12 Jul 2022 07:39:15 -0300 Subject: [PATCH] [KiCad 6][Variants] Fixed problems crossing alternative drawings - Units with DeMorgan alternative drawing got only one crossed Related to #219 --- kibot/kicad/v6_sch.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kibot/kicad/v6_sch.py b/kibot/kicad/v6_sch.py index 97876e08..ae837d92 100644 --- a/kibot/kicad/v6_sch.py +++ b/kibot/kicad/v6_sch.py @@ -896,15 +896,16 @@ class LibComponent(object): for c in range(self.unit_count): name = self.name+"_"+str(c+1) box = Box() - unit_with_graphs = None + units_with_graphs = [] for unit in self.units: # Unit 0 is part of unit 1 if unit.name.startswith(name) or (c == 0 and unit.name.startswith(name0)): box.union(unit.box) if len(unit.draw): - unit_with_graphs = unit - if unit_with_graphs: - unit_with_graphs.cross_box = box + units_with_graphs.append(unit) + if units_with_graphs: + for u in units_with_graphs: + u.cross_box = box def write_cross(s, sdata): """ Add the cross drawing """