Performance enhancement.

This commit is contained in:
Jeff Young 2019-09-09 23:21:59 +01:00
parent 2278f40051
commit cf968cb6b5
1 changed files with 4 additions and 0 deletions

View File

@ -719,6 +719,10 @@ bool SCH_LINE::operator <( const SCH_ITEM& aItem ) const
bool SCH_LINE::HitTest( const wxPoint& aPosition, int aAccuracy ) const
{
// Performance enhancement for connection-building
if( aPosition == m_start || aPosition == m_end )
return true;
return TestSegmentHit( aPosition, m_start, m_end, aAccuracy );
}