Don't double-code the format of unconnected netnames.

It's owned by SCH_PIN::GetDefaultNetName().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15723
This commit is contained in:
Jeff Young 2023-09-24 22:53:32 +01:00
parent 98b35b1a7f
commit 63558d4b09
1 changed files with 1 additions and 7 deletions

View File

@ -648,14 +648,8 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( FOOTPRINT* aFootprint
if( pad->IsNoConnectPad() )
{
netName = wxString::Format( wxT( "unconnected-(%s-Pad%s)" ),
aFootprint->GetReference(), pad->GetNumber() );
for( int jj = 0; !padNetnames.insert( netName ).second; jj++ )
{
netName = wxString::Format( wxT( "unconnected-(%s-Pad%s_%d)" ),
aFootprint->GetReference(), pad->GetNumber(), jj );
}
netName = wxString::Format( wxS( "%s_%d" ), net.GetNetName(), jj );
}
NETINFO_ITEM* netinfo = m_board->FindNet( netName );