From e5ab97994d2f4cf1f935659fbe0ba18e914243c9 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 10 Aug 2020 14:46:34 -0700 Subject: [PATCH] pcbnew: Fix error in proximity calc for zones Zone ContainsPoint() accuracy should be calculating the radial distance and so does not need to be halved. --- pcbnew/connectivity/connectivity_items.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/connectivity/connectivity_items.h b/pcbnew/connectivity/connectivity_items.h index 75990c2bdc..f907ff2e13 100644 --- a/pcbnew/connectivity/connectivity_items.h +++ b/pcbnew/connectivity/connectivity_items.h @@ -378,7 +378,7 @@ public: bool ContainsPoint( const VECTOR2I p, int aAccuracy = 0 ) const { auto zone = static_cast ( Parent() ); - int clearance = ( aAccuracy + 1 ) / 2; + int clearance = aAccuracy; if( zone->GetFilledPolysUseThickness() ) clearance += ( zone->GetMinThickness() + 1 ) / 2;