pcbnew: CONNECTIVITY_ALGO should always mark newly added nets as dirty

Fixes: lp:1761698
* https://bugs.launchpad.net/kicad/+bug/1761698
This commit is contained in:
Tomasz Włostowski 2018-04-06 14:57:12 +02:00
parent 24b8768f43
commit 15c64ee92d
1 changed files with 10 additions and 0 deletions

View File

@ -932,8 +932,18 @@ void CN_CONNECTIVITY_ALGO::MarkNetAsDirty( int aNet )
return; return;
if( (int) m_dirtyNets.size() <= aNet ) if( (int) m_dirtyNets.size() <= aNet )
{
int lastNet = m_dirtyNets.size() - 1;
if( lastNet < 0 )
lastNet = 0;
m_dirtyNets.resize( aNet + 1 ); m_dirtyNets.resize( aNet + 1 );
for( int i = lastNet; i < aNet + 1; i++ )
m_dirtyNets[i] = true;
}
m_dirtyNets[aNet] = true; m_dirtyNets[aNet] = true;
} }