diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index a66bcae656..850d9aaaa6 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -1241,9 +1241,9 @@ int PCB_SELECTION_TOOL::expandConnection( const TOOL_EVENT& aEvent ) for( const EDA_ITEM* item : m_selection.GetItems() ) { - if( item->Type() == PCB_FOOTPRINT_T || - ( BOARD_CONNECTED_ITEM::ClassOf( item ) - && static_cast( item )->IsConnected() ) ) + if( item->Type() == PCB_FOOTPRINT_T + || item->Type() == PCB_GENERATOR_T + || ( static_cast( item )->IsConnected() ) ) { initialCount++; } @@ -1287,6 +1287,14 @@ int PCB_SELECTION_TOOL::expandConnection( const TOOL_EVENT& aEvent ) for( PAD* pad : footprint->Pads() ) startItems.push_back( pad ); } + else if( item->Type() == PCB_GENERATOR_T ) + { + for( BOARD_ITEM* generatedItem : static_cast( item )->GetItems() ) + { + if( BOARD_CONNECTED_ITEM::ClassOf( generatedItem ) ) + startItems.push_back( static_cast( generatedItem ) ); + } + } else if( BOARD_CONNECTED_ITEM::ClassOf( item ) ) { startItems.push_back( static_cast( item ) );