From 42255f10c321a122f0ecf8f8f40be2283f80abff Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Tue, 16 Jan 2024 22:47:15 +0300 Subject: [PATCH] EasyEDA Pro: fix default netport orientations. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16620 --- .../easyedapro/sch_easyedapro_parser.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp b/eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp index b32d885ff6..826ba68042 100644 --- a/eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp +++ b/eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp @@ -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() )