Adjust left- or right-justified text for mirroring.
(cherry picked from commit 97063440bb
)
This commit is contained in:
parent
322524101d
commit
439891c31f
|
@ -175,6 +175,15 @@ void TEXTE_PCB::Flip( const wxPoint& aCentre )
|
||||||
|
|
||||||
SetLayer( FlipLayer( GetLayer(), copperLayerCount ) );
|
SetLayer( FlipLayer( GetLayer(), copperLayerCount ) );
|
||||||
SetMirrored( !IsMirrored() );
|
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() ) );
|
SetLayer( FlipLayer( GetLayer() ) );
|
||||||
SetMirrored( IsBackLayer( GetLayer() ) );
|
SetMirrored( IsBackLayer( GetLayer() ) );
|
||||||
SetLocalCoord();
|
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
|
bool TEXTE_MODULE::IsParentFlipped() const
|
||||||
|
|
Loading…
Reference in New Issue