Adjust left- or right-justified text for mirroring.
This commit is contained in:
parent
615c49315f
commit
97063440bb
|
@ -175,6 +175,15 @@ void TEXTE_PCB::Flip( const wxPoint& aCentre )
|
|||
|
||||
SetLayer( FlipLayer( GetLayer(), copperLayerCount ) );
|
||||
SetMirrored( !IsMirrored() );
|
||||
|
||||
// adjust justified text for mirroring
|
||||
if( GetHorizJustify() == GR_TEXT_HJUSTIFY_LEFT || GetHorizJustify() == GR_TEXT_HJUSTIFY_RIGHT )
|
||||
{
|
||||
if( ( GetHorizJustify() == GR_TEXT_HJUSTIFY_RIGHT ) == IsMirrored() )
|
||||
SetTextX( GetTextPos().x - GetTextBox().GetWidth() );
|
||||
else
|
||||
SetTextX( GetTextPos().x + GetTextBox().GetWidth() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -143,6 +143,16 @@ void TEXTE_MODULE::Flip( const wxPoint& aCentre )
|
|||
SetLayer( FlipLayer( GetLayer() ) );
|
||||
SetMirrored( IsBackLayer( GetLayer() ) );
|
||||
SetLocalCoord();
|
||||
|
||||
// adjust justified text for mirroring
|
||||
if( GetHorizJustify() == GR_TEXT_HJUSTIFY_LEFT || GetHorizJustify() == GR_TEXT_HJUSTIFY_RIGHT )
|
||||
{
|
||||
if( ( GetHorizJustify() == GR_TEXT_HJUSTIFY_RIGHT ) == IsMirrored() )
|
||||
m_Pos0.x -= GetTextBox().GetWidth();
|
||||
else
|
||||
m_Pos0.x += GetTextBox().GetWidth();
|
||||
SetDrawCoord();
|
||||
}
|
||||
}
|
||||
|
||||
bool TEXTE_MODULE::IsParentFlipped() const
|
||||
|
|
Loading…
Reference in New Issue