mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
Fix text rotation after flip
fixes https://gitlab.com/kicad/code/kicad/-/issues/4407
This commit is contained in:
parent
980aefea4b
commit
9cf1e61d8a
@ -177,6 +177,13 @@ void TEXTE_PCB::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
|||||||
SetLayer( FlipLayer( GetLayer(), copperLayerCount ) );
|
SetLayer( FlipLayer( GetLayer(), copperLayerCount ) );
|
||||||
SetMirrored( !IsMirrored() );
|
SetMirrored( !IsMirrored() );
|
||||||
|
|
||||||
|
double text_angle = GetTextAngle();
|
||||||
|
if( text_angle < 1800 )
|
||||||
|
text_angle = 1800 - text_angle;
|
||||||
|
else
|
||||||
|
text_angle = 3600 - text_angle + 1800;
|
||||||
|
SetTextAngle( text_angle );
|
||||||
|
|
||||||
// adjust justified text for mirroring
|
// adjust justified text for mirroring
|
||||||
if( GetHorizJustify() == GR_TEXT_HJUSTIFY_LEFT || GetHorizJustify() == GR_TEXT_HJUSTIFY_RIGHT )
|
if( GetHorizJustify() == GR_TEXT_HJUSTIFY_LEFT || GetHorizJustify() == GR_TEXT_HJUSTIFY_RIGHT )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user