diff --git a/pcbnew/tools/pcb_grid_helper.cpp b/pcbnew/tools/pcb_grid_helper.cpp index bdc7605841..d0fd0b2e96 100644 --- a/pcbnew/tools/pcb_grid_helper.cpp +++ b/pcbnew/tools/pcb_grid_helper.cpp @@ -263,12 +263,9 @@ VECTOR2I PCB_GRID_HELPER::BestSnapAnchor( const VECTOR2I& aOrigin, const LSET& a int snapDist = snapRange; //Respect limits of coordinates representation - VECTOR2D origin = GetClampedCoords( VECTOR2D( aOrigin ) - snapRange / 2 ); - VECTOR2D end = GetClampedCoords( VECTOR2D( aOrigin ) + snapRange / 2 ); - BOX2I bb; - bb.SetOrigin( KiROUND( origin.x ), KiROUND( origin.y ) ); - bb.SetEnd( KiROUND( end.x ), KiROUND( end.y ) ); + bb.SetOrigin( GetClampedCoords( VECTOR2D( aOrigin ) - snapRange / 2 ) ); + bb.SetEnd( GetClampedCoords( VECTOR2D( aOrigin ) + snapRange / 2 ) ); clearAnchors();