Eeschema Eagle Import: Fix label rotation.

This commit is contained in:
Russell Oliver 2017-07-09 15:16:27 +10:00 committed by Maciej Suminski
parent 03739a4d37
commit 2db2319156
1 changed files with 5 additions and 2 deletions

View File

@ -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();
}