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:
parent
d52e50a97a
commit
11586863cf
|
@ -2848,7 +2848,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
|
||||||
if( !( item->GetLayerSet() & lset ).any() )
|
if( !( item->GetLayerSet() & lset ).any() )
|
||||||
continue;
|
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 );
|
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 );
|
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;
|
PCB_TRACK* return_track = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue