From 2db2319156cf8853b196209ce94064a81ab446c4 Mon Sep 17 00:00:00 2001 From: Russell Oliver Date: Sun, 9 Jul 2017 15:16:27 +1000 Subject: [PATCH] Eeschema Eagle Import: Fix label rotation. --- eeschema/sch_eagle_plugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eeschema/sch_eagle_plugin.cpp b/eeschema/sch_eagle_plugin.cpp index ede721f749..d3681ff382 100644 --- a/eeschema/sch_eagle_plugin.cpp +++ b/eeschema/sch_eagle_plugin.cpp @@ -685,9 +685,12 @@ SCH_GLOBALLABEL* SCH_EAGLE_PLUGIN::loadLabel( wxXmlNode* aLabelNode, const wxStr glabel->SetText( elabel.netname ); glabel->SetTextSize( wxSize( GetDefaultTextSize(), GetDefaultTextSize() ) ); + glabel->SetLabelSpinStyle(0); if( elabel.rot ) - glabel->SetLabelSpinStyle( int(elabel.rot.Get().degrees / 90 + 2) % 4 ); - + { + glabel->SetLabelSpinStyle( int( 360-elabel.rot->degrees / 90) % 4 ); + if(elabel.rot->mirror && ( glabel->GetLabelSpinStyle() == 0 || glabel->GetLabelSpinStyle() == 2 )) glabel->SetLabelSpinStyle((glabel->GetLabelSpinStyle()+2)%4); + } return glabel.release(); }