From 9eec296b0a0d9e9ff6a152aa1ef91d7ae92920dc Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 3 Sep 2018 07:42:18 -0700 Subject: [PATCH] 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 --- pcbnew/tools/selection_tool.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index ddb7404f27..4b7223621f 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -963,11 +963,17 @@ void SELECTION_TOOL::selectAllItemsConnectedToTrack( TRACK& aSourceTrack ) 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(); 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 ); + } }