CADSTAR PCB: Copy default netclass settings when creating new ones

Ensures that the global clearance is preserved in the newly created
netclass.
This commit is contained in:
Roberto Fernandez Bautista 2021-10-09 23:10:55 +01:00
parent 41e7284fdc
commit f4ff01a5ab
1 changed files with 2 additions and 1 deletions

View File

@ -3866,7 +3866,8 @@ NETINFO_ITEM* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet( const NET_ID& aCadstarNet
else
{
ROUTECODE rc = getRouteCode( csNet.RouteCodeID );
netclass.reset( new NETCLASS( rc.Name ) );
netclass.reset( new NETCLASS( *m_board->GetDesignSettings().GetDefault() ) );
netclass->SetName( rc.Name );
m_board->GetDesignSettings().GetNetClasses().Add( netclass );
netclass->SetTrackWidth( getKiCadLength( rc.OptimalWidth ) );
m_netClassMap.insert( { csNet.RouteCodeID, netclass } );