mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 14:20:10 +00:00
Keep text angles normalized
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19591
This commit is contained in:
parent
3f2fa3178c
commit
8e23fcab08
@ -324,7 +324,9 @@ void PCB_TEXT::KeepUpright()
|
||||
{
|
||||
SetHorizJustify( static_cast<GR_TEXT_H_ALIGN_T>( -GetHorizJustify() ) );
|
||||
SetVertJustify( static_cast<GR_TEXT_V_ALIGN_T>( -GetVertJustify() ) );
|
||||
SetTextAngle( GetTextAngle() + ANGLE_180 );
|
||||
newAngle += ANGLE_180;
|
||||
newAngle.Normalize();
|
||||
SetTextAngle( newAngle );
|
||||
}
|
||||
}
|
||||
|
||||
@ -375,7 +377,7 @@ void PCB_TEXT::Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle )
|
||||
SetTextPos( pt );
|
||||
|
||||
EDA_ANGLE new_angle = GetTextAngle() + aAngle;
|
||||
new_angle.Normalize180();
|
||||
new_angle.Normalize();
|
||||
SetTextAngle( new_angle );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user