Commit 6311e4e9 authored by Vladimir Ur's avatar Vladimir Ur

Automatic footprint assignment now can be done without equ file, if conditions are met:

* symbol in sch library have only single footprint filter,
* footprint filter have no wildcards,
* according footprint exists in pcb lib.
This could remove need in long equ files for lots of ICs.
parent c5f24127
......@@ -128,6 +128,7 @@ found in the default search paths." ),
BOOST_FOREACH( COMPONENT& component, m_components )
{
bool found = false;
m_ListCmp->SetSelection( ii++, true );
if( !component.m_Module.IsEmpty() )
......@@ -135,7 +136,6 @@ found in the default search paths." ),
BOOST_FOREACH( FOOTPRINT_ALIAS& alias, aliases )
{
bool found = false;
if( alias.m_Name.CmpNoCase( component.m_Value ) != 0 )
continue;
......@@ -170,5 +170,14 @@ any of the project footprint libraries." ),
}
}
/* obviously the last chance: there's only one filter matching one footprint */
if( !found && 1 == component.m_FootprintFilter.GetCount() ) {
/* we do not need to analyse wildcards: single footprint do not contain them */
/* and if there are wildcards it just will not match any */
FOOTPRINT_INFO *module = m_footprints.GetModuleInfo( component.m_FootprintFilter[0] );
if( module ) {
SetNewPkg( component.m_FootprintFilter[0] );
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment