CADSTAR Schematic Archive Importer: Load signal name even if no net label (global labels and power symbols)
Fixes error that prevented global net names from being loaded properly
This commit is contained in:
parent
f6ec173ba7
commit
a33ccf48b9
|
@ -557,26 +557,28 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadNets()
|
|||
{
|
||||
NET_SCH::SYM_TERM netTerm = terminalPair.second;
|
||||
|
||||
if( netTerm.HasNetLabel )
|
||||
{
|
||||
if( mPowerSymMap.find( netTerm.SymbolID ) != mPowerSymMap.end() )
|
||||
{
|
||||
SCH_FIELD* val = mPowerSymMap.at( netTerm.SymbolID )->GetField( VALUE_FIELD );
|
||||
val->SetText( netName );
|
||||
val->SetBold( false );
|
||||
val->SetVisible( false );
|
||||
|
||||
if( netTerm.HasNetLabel )
|
||||
{
|
||||
val->SetVisible( true );
|
||||
val->SetPosition( getKiCadPoint( netTerm.NetLabel.Position ) );
|
||||
val->SetTextAngle( getAngleTenthDegree( netTerm.NetLabel.OrientAngle ) );
|
||||
val->SetBold( false );
|
||||
val->SetVisible( true );
|
||||
|
||||
applyTextSettings( netTerm.NetLabel.TextCodeID, netTerm.NetLabel.Alignment,
|
||||
netTerm.NetLabel.Justification, val );
|
||||
}
|
||||
}
|
||||
else if( mGlobLabelMap.find( netTerm.SymbolID ) != mGlobLabelMap.end() )
|
||||
{
|
||||
mGlobLabelMap.at( netTerm.SymbolID )->SetText( netName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto getHierarchicalLabel = [&]( NETELEMENT_ID aNode ) -> SCH_HIERLABEL*
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue