A footprint does it's own child hit testing.

We only need to add it for groups.
This commit is contained in:
Jeff Young 2024-02-04 23:16:43 +00:00
parent 77c19fa99a
commit 0370db43ae
1 changed files with 9 additions and 6 deletions

View File

@ -2982,12 +2982,15 @@ bool PCB_SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const
bool found = false; bool found = false;
static_cast<BOARD_ITEM*>( item )->RunOnDescendants( if( PCB_GROUP* group = dynamic_cast<PCB_GROUP*>( item ) )
[&]( BOARD_ITEM* aItem ) {
{ group->RunOnDescendants(
if( aItem->HitTest( aPoint, margin ) ) [&]( BOARD_ITEM* aItem )
found = true; {
} ); if( aItem->HitTest( aPoint, margin ) )
found = true;
} );
}
if( found ) if( found )
return true; return true;