Eeschema: SCH_COMPONENT::Visit(): do not select LIB_PIN* pins not related to the

current selected unit and convert.

Fixes #4152
https://gitlab.com/kicad/code/kicad/issues/4152
This commit is contained in:
jean-pierre charras 2020-04-03 16:34:37 +02:00
parent b1b8a32078
commit dac12a6d99
1 changed files with 11 additions and 0 deletions

View File

@ -1553,6 +1553,17 @@ SEARCH_RESULT SCH_COMPONENT::Visit( INSPECTOR aInspector, void* aTestData,
{
for( auto& pin : m_pins )
{
// Collect only pins attached to the current unit and convert.
// others are not associated to this component instance
int pin_unit = pin.get()->GetLibPin()->GetUnit();
int pin_convert = pin.get()->GetLibPin()->GetConvert();
if( pin_unit > 0 && pin_unit != GetUnit() )
continue;
if( pin_convert > 0 && pin_convert != GetConvert() )
continue;
if( SEARCH_RESULT::QUIT == aInspector( pin.get(), (void*) this ) )
return SEARCH_RESULT::QUIT;
}