Pcbnew: Snap to group items

Fixes https://gitlab.com/kicad/code/kicad/issues/7694
This commit is contained in:
Mikolaj Wielgus 2021-04-09 00:41:35 +02:00 committed by Seth Hillbrand
parent b83380b2ba
commit d64de3808f
1 changed files with 10 additions and 0 deletions

View File

@ -674,6 +674,16 @@ void PCB_GRID_HELPER::computeAnchors( BOARD_ITEM* aItem, const VECTOR2I& aRefPos
addAnchor( aItem->GetPosition(), ORIGIN, aItem );
break;
case PCB_GROUP_T:
{
const PCB_GROUP* group = static_cast<const PCB_GROUP*>( aItem );
for( BOARD_ITEM* item : group->GetItems() )
computeAnchors( item, aRefPos, aFrom );
break;
}
default:
break;
}