From 2100c29a1ad2d454e8bf508df06349bc3a127594 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 24 May 2017 21:19:26 +0200 Subject: [PATCH] Fixes: lp:1692436 (reset to defaults in Eeschema, edit component properties, puts fields in the wrong position) https://bugs.launchpad.net/kicad/+bug/1692436 --- eeschema/dialogs/dialog_edit_component_in_schematic.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 46edca3b99..c66edd6a67 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -1111,28 +1111,28 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event ) // Only VALUE, REFERENCE , FOOTPRINT and DATASHEET are re-initialized LIB_FIELD& refField = part->GetReferenceField(); - m_cmp->GetField( REFERENCE )->SetTextPos( refField.GetTextPos() + m_cmp->m_Pos ); m_cmp->GetField( REFERENCE )->ImportValues( refField ); + m_cmp->GetField( REFERENCE )->SetTextPos( refField.GetTextPos() + m_cmp->m_Pos ); LIB_FIELD& valField = part->GetValueField(); - m_cmp->GetField( VALUE )->SetTextPos( valField.GetTextPos() + m_cmp->m_Pos ); m_cmp->GetField( VALUE )->ImportValues( valField ); + m_cmp->GetField( VALUE )->SetTextPos( valField.GetTextPos() + m_cmp->m_Pos ); LIB_FIELD* field = part->GetField(FOOTPRINT); if( field && m_cmp->GetField( FOOTPRINT ) ) { - m_cmp->GetField( FOOTPRINT )->SetTextPos( field->GetTextPos() + m_cmp->m_Pos ); m_cmp->GetField( FOOTPRINT )->ImportValues( *field ); + m_cmp->GetField( FOOTPRINT )->SetTextPos( field->GetTextPos() + m_cmp->m_Pos ); } field = part->GetField(DATASHEET); if( field && m_cmp->GetField( DATASHEET ) ) { - m_cmp->GetField( DATASHEET )->SetTextPos( field->GetTextPos() + m_cmp->m_Pos ); m_cmp->GetField( DATASHEET )->ImportValues( *field ); + m_cmp->GetField( DATASHEET )->SetTextPos( field->GetTextPos() + m_cmp->m_Pos ); } m_cmp->SetOrientation( CMP_NORMAL );