Don't leave orphaned nets in pads after editing in FPEditor.
Fixes https://gitlab.com/kicad/code/kicad/issues/9789
This commit is contained in:
parent
f78033b03c
commit
b0d7c1a810
|
@ -517,13 +517,19 @@ void PCB_EDIT_FRAME::ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew,
|
||||||
{
|
{
|
||||||
PAD* pad_model = nullptr;
|
PAD* pad_model = nullptr;
|
||||||
|
|
||||||
// Skip pad not on a copper layer, because we only want to transfer the net info
|
// Pads with no copper are never connected to a net
|
||||||
if( !pad->IsOnCopperLayer() )
|
if( !pad->IsOnCopperLayer() )
|
||||||
|
{
|
||||||
|
pad->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Pads with no numbers are never connected to a net
|
// Pads with no numbers are never connected to a net
|
||||||
if( pad->GetNumber().IsEmpty() )
|
if( pad->GetNumber().IsEmpty() )
|
||||||
|
{
|
||||||
|
pad->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Search for a similar pad on a copper layer, to reuse net info
|
// Search for a similar pad on a copper layer, to reuse net info
|
||||||
PAD* last_pad = nullptr;
|
PAD* last_pad = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue