Fix broken hit test for arcs in via placer

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17844


(cherry picked from commit aaf3142e9a)

Co-authored-by: Jon Evans <jon@craftyjon.com>
This commit is contained in:
Jon Evans 2024-05-18 17:12:34 +00:00
parent d52e50a97a
commit 11586863cf
1 changed files with 8 additions and 1 deletions

View File

@ -2848,7 +2848,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 );
@ -2858,6 +2858,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;