[KiCad 6][Variants] Fixed problems crossing alternative drawings
- Units with DeMorgan alternative drawing got only one crossed Related to #219
This commit is contained in:
parent
b59a77d900
commit
68c96385d3
|
|
@ -896,15 +896,16 @@ class LibComponent(object):
|
||||||
for c in range(self.unit_count):
|
for c in range(self.unit_count):
|
||||||
name = self.name+"_"+str(c+1)
|
name = self.name+"_"+str(c+1)
|
||||||
box = Box()
|
box = Box()
|
||||||
unit_with_graphs = None
|
units_with_graphs = []
|
||||||
for unit in self.units:
|
for unit in self.units:
|
||||||
# Unit 0 is part of unit 1
|
# Unit 0 is part of unit 1
|
||||||
if unit.name.startswith(name) or (c == 0 and unit.name.startswith(name0)):
|
if unit.name.startswith(name) or (c == 0 and unit.name.startswith(name0)):
|
||||||
box.union(unit.box)
|
box.union(unit.box)
|
||||||
if len(unit.draw):
|
if len(unit.draw):
|
||||||
unit_with_graphs = unit
|
units_with_graphs.append(unit)
|
||||||
if unit_with_graphs:
|
if units_with_graphs:
|
||||||
unit_with_graphs.cross_box = box
|
for u in units_with_graphs:
|
||||||
|
u.cross_box = box
|
||||||
|
|
||||||
def write_cross(s, sdata):
|
def write_cross(s, sdata):
|
||||||
""" Add the cross drawing """
|
""" Add the cross drawing """
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue