Hittesting for background-body-filled shapes (and other fills).

Fixes https://gitlab.com/kicad/code/kicad/issues/7286
This commit is contained in:
Jeff Young 2021-01-26 22:59:36 +00:00
parent 0dd65d9cd1
commit de1c3a83fd
2 changed files with 8 additions and 2 deletions

View File

@ -54,7 +54,10 @@ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef, int aAccuracy ) const
if( abs( dist - GetRadius() ) <= mindist )
return true;
if( m_fill == FILL_TYPE::NO_FILL )
return false;
return dist <= GetRadius();
}

View File

@ -250,7 +250,10 @@ bool LIB_RECTANGLE::HitTest( const wxPoint& aPosition, int aAccuracy ) const
if( TestSegmentHit( aPosition, start, end, mindist ) )
return true;
if( m_fill == FILL_TYPE::NO_FILL )
return false;
return GetBoundingBox().Contains( aPosition );
}