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:
parent
c8c3e1f96a
commit
18995a1527
|
@ -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 ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue