From aeadec40b723eb76b3c32e3f207399be138309b9 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 26 May 2024 15:23:21 +0100 Subject: [PATCH] Select starting track items before expanding selection. Fixes https://gitlab.com/kicad/code/kicad/-/issues/17432 --- pcbnew/tools/pcb_selection_tool.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 0299d088a7..ffe7576d68 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -1476,9 +1476,13 @@ void PCB_SELECTION_TOOL::selectAllConnectedTracks( for( BOARD_CONNECTED_ITEM* startItem : aStartItems ) { - // Track starting pads + // Register starting pads if( startItem->Type() == PCB_PAD_T ) startPadSet.insert( static_cast( startItem ) ); + + // Select any starting track items + if( startItem->IsType( { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T } ) ) + select( startItem ); } for( BOARD_CONNECTED_ITEM* startItem : aStartItems )