diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp index cb5c227de1..900d921cfd 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp @@ -557,25 +557,27 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadNets() { NET_SCH::SYM_TERM netTerm = terminalPair.second; - if( netTerm.HasNetLabel ) + if( mPowerSymMap.find( netTerm.SymbolID ) != mPowerSymMap.end() ) { - 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 ) { - SCH_FIELD* val = mPowerSymMap.at( netTerm.SymbolID )->GetField( VALUE_FIELD ); - val->SetText( netName ); + 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 ); + 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*