page layout draw function: fix a rounding issue.

For items defined by 2 point, the ending point coordinates are rounded to the near integer,
but the starting point coordinates were just truncated instead of being rounding,
creating sometimes an error for horizontal or vertical lines.

Fixes: lp:1835211
https://bugs.launchpad.net/kicad/+bug/1835211
This commit is contained in:
jean-pierre charras 2019-07-03 16:02:32 +02:00
parent c8c3e1f96a
commit 18995a1527
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ const DPOINT WS_DATA_ITEM::GetStartPos( int ii ) const
const wxPoint WS_DATA_ITEM::GetStartPosUi( int ii ) const
{
DPOINT pos = GetStartPos( ii ) * WS_DATA_MODEL::GetTheInstance().m_WSunits2Iu;
return (wxPoint) pos;
return wxPoint( KiROUND( pos.x ), KiROUND( pos.y ) );
}