Eagle import: fix footprint LIB_IDs in the imported board

This commit is contained in:
Maciej Suminski 2018-02-28 11:59:38 +01:00
parent 8e8d95dd7f
commit 419a16ae58
1 changed files with 13 additions and 0 deletions

View File

@ -897,6 +897,19 @@ bool PCB_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
}
// Update module LIB_IDs to point to the just imported Eagle library
for( MODULE* module : GetBoard()->Modules() )
{
LIB_ID libId = module->GetFPID();
if( libId.GetLibItemName().empty() )
continue;
libId.SetLibNickname( newfilename.GetName() );
module->SetFPID( libId );
}
// Store net names for all pads, to create net remap information
std::unordered_map<D_PAD*, wxString> netMap;