Don't filter pins for conversion or unit.

Symbol datastructure is used for all instances, and some instances may
have different conversion and/or units than others.
This commit is contained in:
Jeff Young 2022-09-03 21:47:52 +01:00
parent efae2bbb4c
commit ca5d95a62b
1 changed files with 3 additions and 12 deletions

View File

@ -358,11 +358,8 @@ void SCH_SYMBOL::UpdatePins()
{
wxASSERT( libPin->Type() == LIB_PIN_T );
//if( libPin->GetConvert() && m_convert && m_convert != libPin->GetConvert() )
// continue;
if( libPin->GetUnit() && m_unit && m_unit != libPin->GetUnit() )
continue;
// NW: Don't filter by conversion or unit: this data-structure is used for all instances,
// some if which might have different conversions and/or units.
m_pins.push_back( std::make_unique<SCH_PIN>( libPin, this ) );
@ -395,13 +392,7 @@ void SCH_SYMBOL::SetUnit( int aUnit )
void SCH_SYMBOL::UpdateUnit( int aUnit )
{
if( m_unit != aUnit )
{
m_unit = aUnit;
// The unit may have a different pins so the update the pin map.
UpdatePins();
}
m_unit = aUnit;
}