Allow NIC pins to be stacked

Previously, we only allowed pins of the same time as well as passive
pins to be stacked.  This change allows NIC pins as well since they are
not internally connected, there is no reason that they cannot be tied to
another pin electrically
This commit is contained in:
Seth Hillbrand 2024-04-17 09:56:44 -07:00
parent 01fedb86e2
commit 0e0ada8e4e
1 changed files with 7 additions and 2 deletions

View File

@ -279,11 +279,16 @@ void SCH_PIN::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
bool SCH_PIN::IsStacked( const SCH_PIN* aPin ) const
{
bool isConnectableType_a = GetType() == ELECTRICAL_PINTYPE::PT_PASSIVE
|| GetType() == ELECTRICAL_PINTYPE::PT_NIC;
bool isConnectableType_b = aPin->GetType() == ELECTRICAL_PINTYPE::PT_PASSIVE
|| aPin->GetType() == ELECTRICAL_PINTYPE::PT_NIC;
return m_parent == aPin->GetParent()
&& GetTransformedPosition() == aPin->GetTransformedPosition()
&& GetName() == aPin->GetName()
&& ( ( GetType() == aPin->GetType() ) || ( GetType() == ELECTRICAL_PINTYPE::PT_PASSIVE )
|| ( aPin->GetType() == ELECTRICAL_PINTYPE::PT_PASSIVE ) );
&& ( ( GetType() == aPin->GetType() )
|| isConnectableType_a || isConnectableType_b );
}