mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02: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() ) );
|
SetHorizJustify( static_cast<GR_TEXT_H_ALIGN_T>( -GetHorizJustify() ) );
|
||||||
SetVertJustify( static_cast<GR_TEXT_V_ALIGN_T>( -GetVertJustify() ) );
|
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 );
|
SetTextPos( pt );
|
||||||
|
|
||||||
EDA_ANGLE new_angle = GetTextAngle() + aAngle;
|
EDA_ANGLE new_angle = GetTextAngle() + aAngle;
|
||||||
new_angle.Normalize180();
|
new_angle.Normalize();
|
||||||
SetTextAngle( new_angle );
|
SetTextAngle( new_angle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user