Changed the layer number used to disable *.Adhes
Using undefined generates errors. Now using "Rescue" layer.
This commit is contained in:
parent
80005f2871
commit
bef2203b24
|
|
@ -187,6 +187,7 @@ class VariantOptions(BaseOptions):
|
||||||
badhes = board.GetLayerID('B.Adhes')
|
badhes = board.GetLayerID('B.Adhes')
|
||||||
old_fadhes = []
|
old_fadhes = []
|
||||||
old_badhes = []
|
old_badhes = []
|
||||||
|
rescue = board.GetLayerID('Rescue')
|
||||||
for m in board.GetModules():
|
for m in board.GetModules():
|
||||||
ref = m.GetReference()
|
ref = m.GetReference()
|
||||||
c = comps_hash.get(ref, None)
|
c = comps_hash.get(ref, None)
|
||||||
|
|
@ -203,10 +204,10 @@ class VariantOptions(BaseOptions):
|
||||||
for gi in m.GraphicalItems():
|
for gi in m.GraphicalItems():
|
||||||
l_gi = gi.GetLayer()
|
l_gi = gi.GetLayer()
|
||||||
if l_gi == fadhes:
|
if l_gi == fadhes:
|
||||||
gi.SetLayer(-1)
|
gi.SetLayer(rescue)
|
||||||
old_fadhes.append(gi)
|
old_fadhes.append(gi)
|
||||||
if l_gi == badhes:
|
if l_gi == badhes:
|
||||||
gi.SetLayer(-1)
|
gi.SetLayer(rescue)
|
||||||
old_badhes.append(gi)
|
old_badhes.append(gi)
|
||||||
# Store the data to undo the above actions
|
# Store the data to undo the above actions
|
||||||
self.old_layers = old_layers
|
self.old_layers = old_layers
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue