Performance enhancement.

This commit is contained in:
Jeff Young 2019-09-09 23:21:59 +01:00
parent 90fd58871d
commit b5742d09f8
1 changed files with 5 additions and 1 deletions

View File

@ -708,6 +708,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;
// Insure minimum accuracy
if( aAccuracy == 0 )
aAccuracy = ( GetPenSize() / 2 ) + 4;