PCB_GENERATOR_Ts are PCB_GROUP_Ts too.

Also, an item must already be in a commit to add it to a group.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17595
This commit is contained in:
Jeff Young
2024-06-05 10:51:24 +01:00
parent 944835eefc
commit 9fb07d886e
2 changed files with 3 additions and 22 deletions
+2 -3
View File
@@ -1456,17 +1456,16 @@ void PCB_TUNING_PATTERN::EditPush( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_C
for( BOARD_ITEM* item : routerAddedItems )
{
aCommit->Add( item );
if( PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( item ) )
{
if( bounds.PointInside( track->GetStart(), epsilon )
&& bounds.PointInside( track->GetEnd(), epsilon ) )
{
AddItem( item );
aCommit->Stage( item, CHT_GROUP );
}
}
aCommit->Add( item );
}
}