[PCB Print][KiCad 7] Adapted to the new ZONE.GetFirstLayer()
This commit is contained in:
parent
4cf7eb0bad
commit
aa9826fe88
|
|
@ -340,6 +340,10 @@ class GS(object):
|
|||
return layers.Contains(id)
|
||||
return id in layers.Seq()
|
||||
|
||||
@staticmethod
|
||||
def zone_get_first_layer(e):
|
||||
return e.GetFirstLayer() if GS.ki7 else e.GetLayer()
|
||||
|
||||
@staticmethod
|
||||
def expand_text_variables(text, extra_vars=None):
|
||||
vars = GS.load_pro_variables()
|
||||
|
|
|
|||
|
|
@ -584,7 +584,7 @@ class PCB_PrintOptions(VariantOptions):
|
|||
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:
|
||||
if GS.zone_get_first_layer(e) == id:
|
||||
e.SetLayer(tmp_layer)
|
||||
moved.append(e)
|
||||
found = True
|
||||
|
|
@ -654,7 +654,7 @@ class PCB_PrintOptions(VariantOptions):
|
|||
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:
|
||||
if GS.zone_get_first_layer(e) == id:
|
||||
e.SetLayer(tmp_layer)
|
||||
moved.append(e)
|
||||
found = True
|
||||
|
|
|
|||
Loading…
Reference in New Issue