Delete tuning patterns in Unroute Selected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18065
This commit is contained in:
Jeff Young 2024-05-24 19:23:37 +01:00
parent ecb7cd6b84
commit a678d0d710
1 changed files with 15 additions and 0 deletions

View File

@ -1715,6 +1715,21 @@ void PCB_SELECTION_TOOL::selectAllConnectedTracks(
}
}
// Promote generated members to their PCB_GENERATOR parents
for( EDA_ITEM* item : m_selection )
{
BOARD_ITEM* boardItem = dynamic_cast<BOARD_ITEM*>( item );
PCB_GROUP* parent = boardItem ? boardItem->GetParentGroup() : nullptr;
if( parent && parent->Type() == PCB_GENERATOR_T )
{
unselect( item );
if( !parent->IsSelected() )
select( parent );
}
}
for( BOARD_CONNECTED_ITEM* item : cleanupItems )
item->ClearFlags( SKIP_STRUCT );
}