[KiCad 8] No VECTOR2I(wxPoint) constructor

This commit is contained in:
Salvador E. Tropea 2023-04-05 13:09:03 -03:00
parent a09d62099e
commit 1ea51f4908
1 changed files with 5 additions and 1 deletions

View File

@ -276,7 +276,11 @@ class GS(object):
def p2v_k7(point):
""" KiCad v7 changed various wxPoint args to VECTOR2I.
This helper changes the types accordingly """
return pcbnew.VECTOR2I(point) if GS.ki7 else point
if GS.ki8:
return pcbnew.VECTOR2I(point.x, point.y)
elif GS.ki7:
return pcbnew.VECTOR2I(point)
return point
@staticmethod
def get_modules():