Sort pins in pin-table.
Fixes: lp:1744509 * https://bugs.launchpad.net/kicad/+bug/1744509
This commit is contained in:
parent
6dd398bd6f
commit
6b9866de8b
|
@ -154,6 +154,11 @@ public:
|
||||||
|
|
||||||
void SetGroup( Group* aGroup ) { m_Group = aGroup; }
|
void SetGroup( Group* aGroup ) { m_Group = aGroup; }
|
||||||
|
|
||||||
|
static bool Compare( const Pin& lhs, const Pin& rhs )
|
||||||
|
{
|
||||||
|
return PinNumbers::Compare( lhs.m_Backing->GetNumber(), rhs.m_Backing->GetNumber() ) < 0;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DataViewModel& m_Model;
|
DataViewModel& m_Model;
|
||||||
LIB_PIN* m_Backing;
|
LIB_PIN* m_Backing;
|
||||||
|
@ -245,6 +250,8 @@ DIALOG_LIB_EDIT_PIN_TABLE::DataViewModel::DataViewModel( LIB_PART& aPart ) :
|
||||||
for( LIB_PINS::const_iterator i = m_Backing.begin(); i != m_Backing.end(); ++i )
|
for( LIB_PINS::const_iterator i = m_Backing.begin(); i != m_Backing.end(); ++i )
|
||||||
m_Pins.push_back( Pin( *this, *i ) );
|
m_Pins.push_back( Pin( *this, *i ) );
|
||||||
|
|
||||||
|
m_Pins.sort(Pin::Compare);
|
||||||
|
|
||||||
CalculateGrouping();
|
CalculateGrouping();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue