[PCB Print] Fixed problems with zones on multiple layers
- Now we remove them from the layer set Closes #226
This commit is contained in:
parent
8a47bdee83
commit
513b6526ff
|
|
@ -490,9 +490,20 @@ class PCB_PrintOptions(VariantOptions):
|
|||
e.SetLayer(tmp_layer)
|
||||
moved.append(e)
|
||||
for e in list(GS.board.Zones()):
|
||||
found = False
|
||||
# Remove from the set
|
||||
layers = e.GetLayerSet()
|
||||
if GS.layers_contains(layers, id):
|
||||
layers.removeLayer(id)
|
||||
e.SetLayerSet(layers)
|
||||
removed.append(e)
|
||||
found = True
|
||||
# But this isn't enough if the zone is only one layer, move it to another
|
||||
if e.GetLayer() == id:
|
||||
e.SetLayer(tmp_layer)
|
||||
moved.append(e)
|
||||
found = True
|
||||
if found:
|
||||
zones.append(e)
|
||||
via_type = 'VIA' if GS.ki5() else 'PCB_VIA'
|
||||
for e in GS.board.GetTracks():
|
||||
|
|
@ -550,9 +561,20 @@ class PCB_PrintOptions(VariantOptions):
|
|||
e.SetLayer(tmp_layer)
|
||||
moved.append(e)
|
||||
for e in list(GS.board.Zones()):
|
||||
found = False
|
||||
# Remove from the set
|
||||
layers = e.GetLayerSet()
|
||||
if GS.layers_contains(layers, id):
|
||||
layers.removeLayer(id)
|
||||
e.SetLayerSet(layers)
|
||||
removed.append(e)
|
||||
found = True
|
||||
# But this isn't enough if the zone is only one layer, move it to another
|
||||
if e.GetLayer() == id:
|
||||
e.SetLayer(tmp_layer)
|
||||
moved.append(e)
|
||||
found = True
|
||||
if found:
|
||||
zones.append(e)
|
||||
via_type = 'VIA' if GS.ki5() else 'PCB_VIA'
|
||||
for e in GS.board.GetTracks():
|
||||
|
|
|
|||
Loading…
Reference in New Issue