Skip to content

Commit 64d5cf7

Browse files
committed
At least on KiCad 8.0.6 we can't just modify GetPosition() returned value
Not at least adding a VECTORI2, so we need a copy. Adding (0, 0) does the work. Seen with text objects.
1 parent 209ea18 commit 64d5cf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kikit/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def resolveAnchor(anchor):
313313
a VECTOR2I
314314
"""
315315
choices = {
316-
"tl": lambda x: x.GetPosition(),
316+
"tl": lambda x: x.GetPosition() + toKiCADPoint((0, 0)),
317317
"tr": lambda x: x.GetPosition() + toKiCADPoint((x.GetWidth(), 0)),
318318
"bl": lambda x: x.GetPosition() + toKiCADPoint((0, x.GetHeight())),
319319
"br": lambda x: x.GetPosition() + toKiCADPoint((x.GetWidth(), x.GetHeight())),

0 commit comments

Comments
 (0)