Update symbol ID before running Update Fields from Library.

Fixes: lp:1827707
* https://bugs.launchpad.net/kicad/+bug/1827707

(cherry picked from commit fb881ee209)
This commit is contained in:
Jeff Young 2019-07-08 22:55:42 +01:00
parent d5440d60ab
commit 3418d53a6d
1 changed files with 4 additions and 0 deletions

View File

@ -640,6 +640,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 );