Altium schematic: import net label justification.
(cherry picked from commit 37772ac29e
)
This commit is contained in:
parent
d6eb66c738
commit
6f384c8802
|
@ -667,6 +667,9 @@ ASCH_NET_LABEL::ASCH_NET_LABEL( const std::map<wxString, wxString>& aProps )
|
|||
location = VECTOR2I( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
|
||||
justification = ReadEnum<ASCH_LABEL_JUSTIFICATION>( aProps, "JUSTIFICATION", 0, 8,
|
||||
ASCH_LABEL_JUSTIFICATION::BOTTOM_LEFT );
|
||||
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, "ORIENTATION", 0, 3,
|
||||
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
|
||||
}
|
||||
|
|
|
@ -663,6 +663,7 @@ struct ASCH_NET_LABEL
|
|||
|
||||
VECTOR2I location;
|
||||
|
||||
ASCH_LABEL_JUSTIFICATION justification;
|
||||
ASCH_RECORD_ORIENTATION orientation;
|
||||
|
||||
explicit ASCH_NET_LABEL( const std::map<wxString, wxString>& aProps );
|
||||
|
|
|
@ -2639,27 +2639,7 @@ void SCH_ALTIUM_PLUGIN::ParseNetLabel( const std::map<wxString, wxString>& 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 );
|
||||
|
|
Loading…
Reference in New Issue