Sort pads by netlist before running single-pad-net tests.

Fixes: lp:1782660
* https://bugs.launchpad.net/kicad/+bug/1782660
This commit is contained in:
Jeff Young 2018-07-22 15:33:20 +01:00
parent 8026d2aa41
commit 65f4743a44
1 changed files with 3 additions and 7 deletions

View File

@ -571,13 +571,9 @@ bool BOARD_NETLIST_UPDATER::deleteSinglePadNets()
std::vector<D_PAD*> padlist = m_board->GetPads();
if( m_isDryRun )
{
// During a dry run changes are only stored in the m_padNets cache, so we must sort
// the list ourselves.
std::sort( padlist.begin(), padlist.end(),
[ this ]( D_PAD* a, D_PAD* b ) -> bool { return getNetname( a ) < getNetname( b ); } );
}
// Sort pads by netlist name
std::sort( padlist.begin(), padlist.end(),
[ this ]( D_PAD* a, D_PAD* b ) -> bool { return getNetname( a ) < getNetname( b ); } );
for( unsigned kk = 0; kk < padlist.size(); kk++ )
{