EasyEDA Pro: fix default netport orientations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16620
This commit is contained in:
Alex Shvartzkop 2024-01-16 22:47:15 +03:00
parent fba6aaf0e8
commit 42255f10c3
1 changed files with 14 additions and 5 deletions

View File

@ -1113,23 +1113,32 @@ void SCH_EASYEDAPRO_PARSER::ParseSchematic( SCHEMATIC* aSchematic, SCH_SHEET* aR
SPIN_STYLE spin = SPIN_STYLE::LEFT;
for( double i = component->rotation; i > 0; i -= 90 )
spin = spin.RotateCCW();
label->SetSpinStyle( spin );
if( esymInfo.symbolAttr )
{
wxString symStr = esymInfo.symbolAttr->value;
if( symStr == wxS( "Netport-IN" ) )
{
spin = SPIN_STYLE::LEFT;
label->SetShape( LABEL_FLAG_SHAPE::L_INPUT );
}
if( symStr == wxS( "Netport-OUT" ) )
{
spin = SPIN_STYLE::RIGHT;
label->SetShape( LABEL_FLAG_SHAPE::L_OUTPUT );
}
if( symStr == wxS( "Netport-BI" ) )
{
spin = SPIN_STYLE::RIGHT;
label->SetShape( LABEL_FLAG_SHAPE::L_BIDI );
}
}
for( double i = component->rotation; i > 0; i -= 90 )
spin = spin.RotateCCW();
label->SetSpinStyle( spin );
nlohmann::json style = fontStyles[nameAttr->fontStyle];
if( !style.is_null() && style.at( 5 ).is_number() )