Eeschema, fille polygons: fix HitTest inside polygon.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19255
This commit is contained in:
jean-pierre charras 2024-12-06 18:09:17 +01:00
parent 5feeea8310
commit 776075ee35

View File

@ -1185,8 +1185,9 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
{
if( !m_poly.COutline( 0 ).IsClosed() )
{
SHAPE_POLY_SET copy( m_poly );
copy.Outline( 0 ).Append( copy.Outline( 0 ).CPoint( 0 ) );
// Only one outline is expected
SHAPE_LINE_CHAIN copy( m_poly.COutline( 0 ) );
copy.SetClosed( true );
return copy.Collide( aPosition, maxdist );
}
else