Fix erroneous cursor control with keys when grid size is less than one pixel with certain zoom levels.

This commit is contained in:
Maciej Suminski 2015-07-16 17:52:08 +02:00
parent 232d7462b6
commit 27eafcb5c1
1 changed files with 2 additions and 0 deletions

View File

@ -503,6 +503,8 @@ int PCBNEW_CONTROL::CursorControl( const TOOL_EVENT& aEvent )
// Handler cursor movement // Handler cursor movement
KIGFX::VIEW* view = getView(); KIGFX::VIEW* view = getView();
newCursor = view->ToScreen( newCursor ); newCursor = view->ToScreen( newCursor );
newCursor.x = round( newCursor.x );
newCursor.y = round( newCursor.y );
// Pan the screen if required // Pan the screen if required
const VECTOR2I& screenSize = view->GetGAL()->GetScreenPixelSize(); const VECTOR2I& screenSize = view->GetGAL()->GetScreenPixelSize();