Fixed pad sizes destroyed by pcb_print

- KiCad PAD.GetSize returns a reference to the pad size, not a copy
  of the current size!
This commit is contained in:
Salvador E. Tropea 2022-04-14 08:55:17 -03:00
parent 9d606fa53b
commit f7be522087
1 changed files with 4 additions and 2 deletions

View File

@ -467,7 +467,8 @@ class PCB_PrintOptions(VariantOptions):
dr = pad.GetDrillSize()
if dr.x:
continue
resized.append((pad, pad.GetSize()))
size = pad.GetSize()
resized.append((pad, wxSize(size.x, size.y)))
pad.SetSize(size_0)
for e in GS.board.GetDrawings():
if e.GetLayer() == id:
@ -517,7 +518,8 @@ class PCB_PrintOptions(VariantOptions):
gi.SetLayer(tmp_layer)
moved.append(gi)
for pad in m.Pads():
resized.append((pad, pad.GetSize()))
size = pad.GetSize()
resized.append((pad, wxSize(size.x, size.y)))
pad.SetSize(size_0)
for e in GS.board.GetDrawings():
if e.GetLayer() == id: