Skip to content

Commit

Permalink
At least on KiCad 8.0.6 we can't just modify GetPosition() returned v…
Browse files Browse the repository at this point in the history
…alue

Not at least adding a VECTORI2, so we need a copy.
Adding (0, 0) does the work.
Seen with text objects.
  • Loading branch information
set-soft committed Nov 27, 2024
1 parent f972993 commit b021577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kikit/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def resolveAnchor(anchor):
a VECTOR2I
"""
choices = {
"tl": lambda x: x.GetPosition(),
"tl": lambda x: x.GetPosition() + toKiCADPoint((0, 0)),
"tr": lambda x: x.GetPosition() + toKiCADPoint((x.GetWidth(), 0)),
"bl": lambda x: x.GetPosition() + toKiCADPoint((0, x.GetHeight())),
"br": lambda x: x.GetPosition() + toKiCADPoint((x.GetWidth(), x.GetHeight())),
Expand Down

0 comments on commit b021577

Please sign in to comment.