Make sure newly-added footprint's pads get Default net.

Fixes https://gitlab.com/kicad/code/kicad/issues/6108
This commit is contained in:
Jeff Young 2020-10-22 11:48:39 +01:00
parent d785dae88b
commit af184e58b5
1 changed files with 4 additions and 0 deletions

View File

@ -867,6 +867,10 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent )
// Set parent so that clearance can be loaded
fp->SetParent( board );
// Pads in the library all have orphaned nets. Replace with Default.
for( D_PAD* pad : fp->Pads() )
pad->SetNetCode( 0 );
// Put it on FRONT layer,
// (Can be stored flipped if the lib is an archive built from a board)
if( fp->IsFlipped() )