fix(spatial): pcbnew 的 GetParent 不是封装,引用改用 GetParentFootprint
This commit is contained in:
1 parent
f7759f5331
commit
1d179c2506
1 file changed
+3
-1
@@ -30,8 +30,10 @@ def _pads(board):
|
||||
|
||||
|
||||
def _ref(pad) -> str:
|
||||
"""Footprint reference. ``GetParent()`` returns a container, not a footprint
|
||||
(measured on KiCad 10.0.6), so the accessor is ``GetParentFootprint``."""
|
||||
try:
|
||||
return pad.GetParent().GetReference()
|
||||
return pad.GetParentFootprint().GetReference()
|
||||
except Exception:
|
||||
return "?"
|
||||
|
||||
|
||||
Reference in new issue
Block a user