Mirror sheet fields when mirroring sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/9479
This commit is contained in:
parent
0cdffa16d4
commit
fe6cb7dbb4
|
@ -781,21 +781,41 @@ void SCH_SHEET::Rotate( const wxPoint& aCenter )
|
|||
|
||||
void SCH_SHEET::MirrorVertically( int aCenter )
|
||||
{
|
||||
int dy = m_pos.y;
|
||||
|
||||
MIRROR( m_pos.y, aCenter );
|
||||
m_pos.y -= m_size.y;
|
||||
dy -= m_pos.y; // 0,dy is the move vector for this transform
|
||||
|
||||
for( SCH_SHEET_PIN* sheetPin : m_pins )
|
||||
sheetPin->MirrorVertically( aCenter );
|
||||
|
||||
for( SCH_FIELD& field : m_fields )
|
||||
{
|
||||
wxPoint pos = field.GetTextPos();
|
||||
pos.y -= dy;
|
||||
field.SetTextPos( pos );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_SHEET::MirrorHorizontally( int aCenter )
|
||||
{
|
||||
int dx = m_pos.x;
|
||||
|
||||
MIRROR( m_pos.x, aCenter );
|
||||
m_pos.x -= m_size.x;
|
||||
dx -= m_pos.x; // dx,0 is the move vector for this transform
|
||||
|
||||
for( SCH_SHEET_PIN* sheetPin : m_pins )
|
||||
sheetPin->MirrorHorizontally( aCenter );
|
||||
|
||||
for( SCH_FIELD& field : m_fields )
|
||||
{
|
||||
wxPoint pos = field.GetTextPos();
|
||||
pos.x -= dx;
|
||||
field.SetTextPos( pos );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1467,7 +1467,7 @@ void SCH_SYMBOL::MirrorVertically( int aCenter )
|
|||
|
||||
SetOrientation( SYM_MIRROR_X );
|
||||
MIRROR( m_pos.y, aCenter );
|
||||
dy -= m_pos.y; // dy,0 is the move vector for this transform
|
||||
dy -= m_pos.y; // 0,dy is the move vector for this transform
|
||||
|
||||
for( SCH_FIELD& field : m_fields )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue