From c7e3887ba47d2c0b9b863e5631e58d0a59ba160f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 12 Mar 2014 15:00:14 +0100 Subject: [PATCH] Fixed erroneous hit testing for polygons in ratsnest for GAL. --- pcbnew/ratsnest_data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 6b9d2b043a..2845e04475 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -356,8 +356,8 @@ bool RN_POLY::HitTest( const RN_NODE_PTR& aNode ) const x2 = xOld; y2 = yOld; } - if( ( xNew < xt ) == ( xt <= xOld ) /* edge "open" at left end */ - && ( yt - y1 ) * ( x2 - x1 ) < ( y2 - y1 ) * ( xt - x1 ) ) + if( ( xNew < xt ) == ( xt <= xOld ) && /* edge "open" at left end */ + (float)( yt - y1 ) * (float)( x2 - x1 ) < (float)( y2 - y1 ) * (float)( xt - x1 ) ) { inside = !inside; }