From b02157719a267b41346cce135178cfa60ff7f3ef Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 27 Nov 2024 09:41:08 -0300 Subject: [PATCH] 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. --- kikit/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kikit/common.py b/kikit/common.py index 631f905e..59f003dd 100644 --- a/kikit/common.py +++ b/kikit/common.py @@ -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())),