From 27eafcb5c1374ff3de245450e3bb09c68fa99d73 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 Jul 2015 17:52:08 +0200 Subject: [PATCH] Fix erroneous cursor control with keys when grid size is less than one pixel with certain zoom levels. --- pcbnew/tools/pcbnew_control.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 9fef98e209..0df1769e50 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -503,6 +503,8 @@ int PCBNEW_CONTROL::CursorControl( const TOOL_EVENT& aEvent ) // Handler cursor movement KIGFX::VIEW* view = getView(); newCursor = view->ToScreen( newCursor ); + newCursor.x = round( newCursor.x ); + newCursor.y = round( newCursor.y ); // Pan the screen if required const VECTOR2I& screenSize = view->GetGAL()->GetScreenPixelSize();