fp texts are not upright when footprint rot is not n*90deg

Fixes #10882
https://gitlab.com/kicad/code/kicad/issues/10882
This commit is contained in:
jean-pierre charras 2022-02-24 09:08:09 +01:00
parent d2069e1548
commit 8ef4ef8d96
1 changed files with 2 additions and 2 deletions

View File

@ -241,11 +241,11 @@ EDA_ANGLE FP_TEXT::GetDrawRotation() const
if( IsKeepUpright() )
{
// Keep angle between 0 .. 90 deg. Otherwise the text is not easy to read
// Keep angle between ]-90 .. 90 deg]. Otherwise the text is not easy to read
while( rotation > ANGLE_90 )
rotation -= ANGLE_180;
while( rotation < ANGLE_0 )
while( rotation <= -ANGLE_90 )
rotation += ANGLE_180;
}
else