eeschema: fix arc orientation issue when reading old symbol libs (version 20210619).

Fixes #12514
https://gitlab.com/kicad/code/kicad/issues/12514
This commit is contained in:
jean-pierre charras 2022-10-07 16:57:45 +02:00
parent bc58480e24
commit 8c19bf4815
1 changed files with 8 additions and 1 deletions

View File

@ -1067,7 +1067,14 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseArc()
arc->CalcArcAngles( arc_start, arc_end );
arc_angle = arc_end - arc_start;
if( arc_angle == ANGLE_180 )
// The arc angle should be <= 180 deg.
// If > 180 we need to swap arc ends (the first choice was not good)
if( arc_angle > ANGLE_180 )
{
arc->SetStart( startPoint );
arc->SetEnd( endPoint );
}
else if( arc_angle == ANGLE_180 )
{
arc->SetStart( startPoint );
arc->SetEnd( endPoint );