Legacy symbol library reader: fix incorrect arc angle in some symbols.
Fixes #12346 https://gitlab.com/kicad/code/kicad/issues/12346
This commit is contained in:
parent
90996d0698
commit
3e257794c0
|
@ -817,6 +817,16 @@ LIB_SHAPE* SCH_LEGACY_PLUGIN_CACHE::loadArc( std::unique_ptr<LIB_SYMBOL>& aSymbo
|
|||
arc->SetCenter( new_center );
|
||||
}
|
||||
|
||||
// In legacy libraries, an arc angle is always <= 180.0 degrees
|
||||
// So if the created arc is > 180 degrees, swap arc ends to have a < 180 deg arc.
|
||||
if( arc->GetArcAngle() > ANGLE_180 )
|
||||
{
|
||||
VECTOR2I new_end = arc->GetStart();
|
||||
VECTOR2I new_start = arc->GetEnd();
|
||||
arc->SetStart( new_start );
|
||||
arc->SetEnd( new_end );
|
||||
}
|
||||
|
||||
return arc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue