Record nested footprints for collision checking.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16410
This commit is contained in:
Jeff Young 2023-12-24 19:40:10 +00:00
parent c051e66830
commit 6a5adc7646
1 changed files with 15 additions and 3 deletions

View File

@ -626,10 +626,22 @@ bool EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, BOARD_COMMIT* aCommit
}
else
{
for( BOARD_ITEM* item : sel_items )
if( showCourtyardConflicts )
{
if( showCourtyardConflicts && item->Type() == PCB_FOOTPRINT_T )
drc_on_move->m_FpInMove.push_back( static_cast<FOOTPRINT*>( item ) );
std::vector<FOOTPRINT*>& FPs = drc_on_move->m_FpInMove;
for( BOARD_ITEM* item : sel_items )
{
if( item->Type() == PCB_FOOTPRINT_T )
FPs.push_back( static_cast<FOOTPRINT*>( item ) );
item->RunOnDescendants(
[&]( BOARD_ITEM* descendent )
{
if( descendent->Type() == PCB_FOOTPRINT_T )
FPs.push_back( static_cast<FOOTPRINT*>( descendent ) );
} );
}
}
m_cursor = grid.BestDragOrigin( originalCursorPos, sel_items,