Skip to content

Commit 28352de

Browse files
committed
Fix compatibility with current nightly
1 parent 621368c commit 28352de

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

InteractiveHtmlBom/ecad/kicad.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ def parse_text(self, d):
138138
else:
139139
height = d.GetHeight() * 1e-6
140140
width = d.GetWidth() * 1e-6
141+
if hasattr(d, "GetTextThickness"):
142+
thickness = d.GetTextThickness() * 1e-6
143+
else:
144+
thickness = d.GetThickness() * 1e-6
141145
if hasattr(d, "GetShownText"):
142146
text = d.GetShownText()
143147
else:
@@ -156,7 +160,7 @@ def parse_text(self, d):
156160
"height": height,
157161
"width": width,
158162
"horiz_justify": d.GetHorizJustify(),
159-
"thickness": d.GetThickness() * 1e-6,
163+
"thickness": thickness,
160164
"attr": attributes,
161165
"angle": angle
162166
}

0 commit comments

Comments
 (0)