Commit a7b916d6 authored by unknown's avatar unknown Committed by jean-pierre charras

Eeschema: Fix Bug #983251 (Eeschema mouse hit testing error on non horizontal or vertical wires)

parent 86b39ca3
......@@ -571,17 +571,18 @@ bool SCH_LINE::HitTest( const wxPoint& aPosition, int aAccuracy ) const
bool SCH_LINE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
if( m_Flags & STRUCT_DELETED || m_Flags & SKIP_STRUCT )
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) )
return false;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );
if ( aAccuracy )
rect.Inflate( aAccuracy );
if( aContained )
return rect.Contains( GetBoundingBox() );
return rect.Contains( m_start ) && rect.Contains( m_end );
return rect.Intersects( GetBoundingBox() );
return rect.Intersects( m_start, m_end );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment