pcbnew: Select copper through THT connections

This allows full copper connections even when THT changes a trace layer.
It avoides selecting the actual pad to prevent actions on the copper
connections from affecting the footprints as well.

Fixes: lp:1789807
* https://bugs.launchpad.net/kicad/+bug/1789807
This commit is contained in:
Seth Hillbrand 2018-09-03 07:42:18 -07:00
parent 0d09128f6c
commit 1d9c9cd10d
1 changed files with 8 additions and 2 deletions

View File

@ -968,11 +968,17 @@ void SELECTION_TOOL::selectAllItemsConnectedToTrack( TRACK& aSourceTrack )
void SELECTION_TOOL::selectAllItemsConnectedToItem( BOARD_CONNECTED_ITEM& aSourceItem ) void SELECTION_TOOL::selectAllItemsConnectedToItem( BOARD_CONNECTED_ITEM& aSourceItem )
{ {
constexpr KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, EOT }; constexpr KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_PAD_T, EOT };
auto connectivity = board()->GetConnectivity(); auto connectivity = board()->GetConnectivity();
for( auto item : connectivity->GetConnectedItems( &aSourceItem, types ) ) for( auto item : connectivity->GetConnectedItems( &aSourceItem, types ) )
select( item ); {
// We want to select items connected through pads but not pads
// otherwise, the common use case of "Select Copper"->Delete will
// remove footprints in addition to traces and vias
if( item->Type() != PCB_PAD_T )
select( item );
}
} }