pcad2kicadpcb_plugin: fix import a flipped RefDes

Fixes: lp:1730172
* https://bugs.launchpad.net/kicad/+bug/1730172
This commit is contained in:
Eldar Khayrullin 2017-12-11 21:35:14 +03:00 committed by Maciej Suminski
parent 9620a43022
commit 613272852d
1 changed files with 3 additions and 5 deletions

View File

@ -542,7 +542,7 @@ void PCB_MODULE::AddToBoard()
ref_text->SetMirrored( m_name.mirror ); ref_text->SetMirrored( m_name.mirror );
ref_text->SetVisible( m_name.textIsVisible ); ref_text->SetVisible( m_name.textIsVisible );
ref_text->SetLayer( m_KiCadLayer ); ref_text->SetLayer( m_name.mirror ? FlipLayer( m_KiCadLayer ) : m_KiCadLayer );
// Calculate the actual position. // Calculate the actual position.
ref_text->SetDrawCoord(); ref_text->SetDrawCoord();
@ -566,7 +566,7 @@ void PCB_MODULE::AddToBoard()
val_text->SetMirrored( m_value.mirror ); val_text->SetMirrored( m_value.mirror );
val_text->SetVisible( m_value.textIsVisible ); val_text->SetVisible( m_value.textIsVisible );
val_text->SetLayer( m_KiCadLayer ); val_text->SetLayer( m_value.mirror ? FlipLayer( m_KiCadLayer ) : m_KiCadLayer );
// Calculate the actual position. // Calculate the actual position.
val_text->SetDrawCoord(); val_text->SetDrawCoord();
@ -619,8 +619,6 @@ void PCB_MODULE::Flip()
if( m_mirror == 1 ) if( m_mirror == 1 )
{ {
// Flipped
m_KiCadLayer = FlipLayer( m_KiCadLayer );
m_rotation = -m_rotation; m_rotation = -m_rotation;
for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ ) for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )