Fixed KiCad 5 doesn't have LSET.Contains()
This commit is contained in:
parent
9b18c5300a
commit
e1586484f5
|
|
@ -273,6 +273,12 @@ class GS(object):
|
|||
def zones():
|
||||
return pcbnew.ZONES() if GS.ki6() else pcbnew.ZONE_CONTAINERS()
|
||||
|
||||
@staticmethod
|
||||
def layers_contains(layers, id):
|
||||
if GS.ki6():
|
||||
return layers.Contains(id)
|
||||
return id in layers.Seq()
|
||||
|
||||
@staticmethod
|
||||
def expand_text_variables(text, extra_vars=None):
|
||||
vars = GS.load_pro_variables()
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ class PCB_PrintOptions(VariantOptions):
|
|||
if dr.x:
|
||||
continue
|
||||
layers = pad.GetLayerSet()
|
||||
if layers.Contains(id):
|
||||
if GS.layers_contains(layers, id):
|
||||
layers.removeLayer(id)
|
||||
pad.SetLayerSet(layers)
|
||||
removed.append(pad)
|
||||
|
|
@ -592,7 +592,7 @@ class PCB_PrintOptions(VariantOptions):
|
|||
moved.append(gi)
|
||||
for pad in m.Pads():
|
||||
layers = pad.GetLayerSet()
|
||||
if layers.Contains(id):
|
||||
if GS.layers_contains(layers, id):
|
||||
layers.removeLayer(id)
|
||||
pad.SetLayerSet(layers)
|
||||
removed.append(pad)
|
||||
|
|
|
|||
Loading…
Reference in New Issue