Update symbol ID before running Update Fields from Library.

Fixes: lp:1827707
* https://bugs.launchpad.net/kicad/+bug/1827707
This commit is contained in:
Jeff Young 2019-07-08 22:55:42 +01:00
parent b8013648d2
commit fb881ee209
1 changed files with 4 additions and 0 deletions

View File

@ -639,6 +639,10 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary( wxCommandEvent
SCH_COMPONENT copy( *m_cmp );
copy.SetFields( *m_fields );
LIB_ID id;
id.Parse( m_libraryNameTextCtrl->GetValue(), LIB_ID::ID_SCH, true );
copy.SetLibId( id, Prj().SchSymbolLibTable(), Prj().SchLibs()->GetCacheLibrary() );
// Update the requested fields in the component copy
std::list<SCH_COMPONENT*> components;
components.push_back( &copy );