Don't truncate values on import

Leads to off-by-one errors when converting to internal values

Fixes https://gitlab.com/kicad/code/kicad/issues/9827
This commit is contained in:
Seth Hillbrand 2021-11-30 16:10:24 -08:00
parent b729068326
commit c4a6a61743
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ GRAPHICS_IMPORTER_PCBNEW::GRAPHICS_IMPORTER_PCBNEW()
wxPoint GRAPHICS_IMPORTER_PCBNEW::MapCoordinate( const VECTOR2D& aCoordinate )
{
VECTOR2D coord = ( aCoordinate + GetImportOffsetMM() ) * ImportScalingFactor();
return wxPoint( (int) coord.x, (int) coord.y );
return wxPoint( KiROUND( coord.x ), KiROUND( coord.y ) );
}