From b64611af7a9ca0953d2fdfaa7b5129783c3a2b17 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 29 Jan 2021 14:28:26 -0800 Subject: [PATCH] Make highlight net flexible with grid --- eeschema/tools/ee_selection_tool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 4d087cfc29..90137d9791 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -1177,7 +1177,8 @@ EDA_ITEM* EE_SELECTION_TOOL::GetNode( VECTOR2I aPosition ) EE_COLLECTOR collector; //TODO(snh): Reimplement after exposing KNN interface - int thresholdMax = KiROUND( getView()->ToWorld( HITTEST_THRESHOLD_PIXELS ) ); + int thresholdMax = KiROUND( + m_toolMgr->GetView()->GetGAL()->GetGridSize().EuclideanNorm() ); for( int threshold : { 0, thresholdMax/2, thresholdMax } ) {