fix(spatial): pcbnew 的 GetParent 不是封装,引用改用 GetParentFootprint

This commit is contained in:
liuhuajie committed 2026-12-04 00:47:37 +08:00
1 parent f7759f5331
commit 1d179c2506
1 file changed
+3 -1
+3 -1
View File
@@ -30,8 +30,10 @@ def _pads(board):
def _ref(pad) -> str: 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: try:
return pad.GetParent().GetReference() return pad.GetParentFootprint().GetReference()
except Exception: except Exception:
return "?" return "?"