Fix broken hit test for arcs in via placer

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17844
This commit is contained in:
Jon Evans 2024-05-18 13:12:01 -04:00
parent d82b149f29
commit aaf3142e9a
1 changed files with 8 additions and 1 deletions

View File

@ -3079,7 +3079,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
if( !( item->GetLayerSet() & lset ).any() )
continue;
if( item->Type() == PCB_TRACE_T || item->Type() == PCB_ARC_T )
if( item->Type() == PCB_TRACE_T )
{
PCB_TRACK* track = static_cast<PCB_TRACK*>( item );
@ -3089,6 +3089,13 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
possible_tracks.push_back( track );
}
}
else if( item->Type() == PCB_ARC_T )
{
PCB_ARC* arc = static_cast<PCB_ARC*>( item );
if( arc->HitTest( position, aVia->GetWidth() / 2 ) )
possible_tracks.push_back( arc );
}
}
PCB_TRACK* return_track = nullptr;