From c761d30aded46dde8429f5567774fa4d6d1e5c05 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 26 Jan 2017 20:19:20 +0100 Subject: [PATCH] Make FootprintWizardBase.py compatible with last changes in EDA_TEXT. --- pcbnew/python/plugins/FPC_wizard.py | 3 ++- pcbnew/python/plugins/FootprintWizardBase.py | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pcbnew/python/plugins/FPC_wizard.py b/pcbnew/python/plugins/FPC_wizard.py index e9bd6d3c12..6e0e6491da 100644 --- a/pcbnew/python/plugins/FPC_wizard.py +++ b/pcbnew/python/plugins/FPC_wizard.py @@ -76,7 +76,8 @@ class FPC_FootprintWizard(FootprintWizardBase.FootprintWizard): # Gives a position and size to ref and value texts: textposy = pad_height/2 + pcbnew.FromMM(1) + self.GetTextThickness() - self.draw.Reference( 0, textposy, size_text ) + angle_degree = 0.0 + self.draw.Reference( 0, textposy, size_text, angle_degree ) textposy = textposy + size_text + self.GetTextThickness() self.draw.Value( 0, textposy, size_text ) diff --git a/pcbnew/python/plugins/FootprintWizardBase.py b/pcbnew/python/plugins/FootprintWizardBase.py index e0305e2f76..158128aea6 100644 --- a/pcbnew/python/plugins/FootprintWizardBase.py +++ b/pcbnew/python/plugins/FootprintWizardBase.py @@ -530,10 +530,10 @@ class FootprintWizardDrawingAids: text_size = pcbnew.wxSize(size, size) self.module.Reference().SetPos0(self.TransformPoint(x, y)) - self.module.Reference().SetTextPosition( + self.module.Reference().SetPosition( self.module.Reference().GetPos0()) - self.module.Reference().SetSize(text_size) - self.module.Reference().SetOrientation(orientation_degree*10) # internal angles are in 0.1 deg + self.module.Reference().SetTextSize(text_size) + self.module.Reference().SetTextAngle(orientation_degree*10) # internal angles are in 0.1 deg def Value(self, x, y, size, orientation_degree = 0): """ @@ -542,10 +542,10 @@ class FootprintWizardDrawingAids: text_size = pcbnew.wxSize(size, size) self.module.Value().SetPos0(self.TransformPoint(x, y)) - self.module.Value().SetTextPosition(self.module.Value().GetPos0()) - self.module.Value().SetSize(text_size) + self.module.Value().SetPosition(self.module.Value().GetPos0()) + self.module.Value().SetTextSize(text_size) self.module.Value().SetLayer(self.DefaultTextValueLayer()) - self.module.Value().SetOrientation(orientation_degree*10) # internal angles are in 0.1 deg + self.module.Value().SetTextAngle(orientation_degree*10) # internal angles are in 0.1 deg def Box(self, x, y, w, h): """