diff --git a/eeschema/sch_plugins/altium/altium_parser_sch.cpp b/eeschema/sch_plugins/altium/altium_parser_sch.cpp index 4048bc463b..8824753be3 100644 --- a/eeschema/sch_plugins/altium/altium_parser_sch.cpp +++ b/eeschema/sch_plugins/altium/altium_parser_sch.cpp @@ -667,6 +667,9 @@ ASCH_NET_LABEL::ASCH_NET_LABEL( const std::map& aProps ) location = VECTOR2I( ReadKiCadUnitFrac( aProps, "LOCATION.X" ), -ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) ); + justification = ReadEnum( aProps, "JUSTIFICATION", 0, 8, + ASCH_LABEL_JUSTIFICATION::BOTTOM_LEFT ); + orientation = ReadEnum( aProps, "ORIENTATION", 0, 3, ASCH_RECORD_ORIENTATION::RIGHTWARDS ); } diff --git a/eeschema/sch_plugins/altium/altium_parser_sch.h b/eeschema/sch_plugins/altium/altium_parser_sch.h index 36350fcef5..8a20544192 100644 --- a/eeschema/sch_plugins/altium/altium_parser_sch.h +++ b/eeschema/sch_plugins/altium/altium_parser_sch.h @@ -664,6 +664,7 @@ struct ASCH_NET_LABEL VECTOR2I location; + ASCH_LABEL_JUSTIFICATION justification; ASCH_RECORD_ORIENTATION orientation; explicit ASCH_NET_LABEL( const std::map& aProps ); diff --git a/eeschema/sch_plugins/altium/sch_altium_plugin.cpp b/eeschema/sch_plugins/altium/sch_altium_plugin.cpp index b0d6fd7eaa..c5ae132231 100644 --- a/eeschema/sch_plugins/altium/sch_altium_plugin.cpp +++ b/eeschema/sch_plugins/altium/sch_altium_plugin.cpp @@ -2640,27 +2640,7 @@ void SCH_ALTIUM_PLUGIN::ParseNetLabel( const std::map& aProp SCH_SCREEN* screen = getCurrentScreen(); wxCHECK( screen, /* void */ ); - switch( elem.orientation ) - { - case ASCH_RECORD_ORIENTATION::RIGHTWARDS: - label->SetTextSpinStyle( TEXT_SPIN_STYLE::RIGHT ); - break; - - case ASCH_RECORD_ORIENTATION::UPWARDS: - label->SetTextSpinStyle( TEXT_SPIN_STYLE::UP ); - break; - - case ASCH_RECORD_ORIENTATION::LEFTWARDS: - label->SetTextSpinStyle( TEXT_SPIN_STYLE::LEFT ); - break; - - case ASCH_RECORD_ORIENTATION::DOWNWARDS: - label->SetTextSpinStyle( TEXT_SPIN_STYLE::BOTTOM ); - break; - - default: - break; - } + SetTextPositioning( label, elem.justification, elem.orientation ); label->SetFlags( IS_NEW ); screen->Append( label );