Handle mirroring for multiple selections containing text or labels.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15936
This commit is contained in:
Jeff Young 2023-11-14 15:53:37 +00:00
parent ca8cb5a206
commit 298b309ebe
1 changed files with 2 additions and 8 deletions

View File

@ -88,24 +88,18 @@ void SCH_TEXT::FlipHJustify()
void SCH_TEXT::MirrorHorizontally( int aCenter )
{
if( GetTextAngle() == ANGLE_HORIZONTAL )
{
FlipHJustify();
if( GetHorizJustify() == GR_TEXT_H_ALIGN_LEFT || GetHorizJustify() == GR_TEXT_H_ALIGN_RIGHT )
SetTextX( MIRRORVAL( GetTextPos().x, aCenter ) );
}
SetTextX( MIRRORVAL( GetTextPos().x, aCenter ) );
}
void SCH_TEXT::MirrorVertically( int aCenter )
{
if( GetTextAngle() == ANGLE_VERTICAL )
{
FlipHJustify();
if( GetHorizJustify() == GR_TEXT_H_ALIGN_LEFT || GetHorizJustify() == GR_TEXT_H_ALIGN_RIGHT )
SetTextY( MIRRORVAL( GetTextPos().y, aCenter ) );
}
SetTextY( MIRRORVAL( GetTextPos().y, aCenter ) );
}