Browse Source

SCH_PINs define their own sorting order.

Don't use SCH_ITEM's compare function.

This is required so that SCH_PINs sort in the same
order as their LIB_PIN equivalents in the library.
fusion360
Jeff Young 2 years ago
parent
commit
615f84e567
  1. 7
      eeschema/sch_pin.cpp

7
eeschema/sch_pin.cpp

@ -1342,11 +1342,6 @@ int SCH_PIN::compare( const SCH_ITEM& aOther, int aCompareFlags ) const
{
wxASSERT( aOther.Type() == SCH_PIN_T );
int retv = SCH_ITEM::compare( aOther, aCompareFlags );
if( retv )
return retv;
const SCH_PIN* tmp = (SCH_PIN*) &aOther;
// When comparing units, we do not compare the part numbers. If everything else is
@ -1397,7 +1392,7 @@ int SCH_PIN::compare( const SCH_ITEM& aOther, int aCompareFlags ) const
const ALT& lhsAlt = lhsItem->second;
const ALT& rhsAlt = rhsItem->second;
retv = lhsAlt.m_Name.Cmp( rhsAlt.m_Name );
int retv = lhsAlt.m_Name.Cmp( rhsAlt.m_Name );
if( retv )
return retv;

Loading…
Cancel
Save