pcbnew: Don't reset triangular points for intersection

We prevent the creation of invalid polygons by keeping the converging
lines from intersecting.  This test doesn't make sense for triangular
polygons as they always intersect and we want to allow them to move
outside of the singular point.

Fixes: lp:1831481
* https://bugs.launchpad.net/kicad/+bug/1831481

(cherry picked from commit 966173c129)
This commit is contained in:
Seth Hillbrand 2019-06-07 21:33:09 -07:00
parent a75dd7f48c
commit 1a3b129d1e
1 changed files with 6 additions and 2 deletions

View File

@ -172,11 +172,15 @@ void EC_CONVERGING::Apply( EDIT_LINE& aHandle )
endSide = SEG( end.GetPosition(), nextEnd.GetPosition() );
if( OPT_VECTOR2I originEndIntersect = endSide.Intersect( originSide ) )
{
// Triangle intersect by definition
if( m_editPoints.LinesSize() > 3 )
{
origin.SetPosition( *originEndIntersect );
end.SetPosition( *originEndIntersect );
}
}
}
EC_SNAPLINE::EC_SNAPLINE( EDIT_LINE& aLine, V2D_TRANSFORM_FUN aSnapFun ) :