From 15c64ee92d747ec17ee05d5eb3bdf48e7033de4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Fri, 6 Apr 2018 14:57:12 +0200 Subject: [PATCH] pcbnew: CONNECTIVITY_ALGO should always mark newly added nets as dirty Fixes: lp:1761698 * https://bugs.launchpad.net/kicad/+bug/1761698 --- pcbnew/connectivity_algo.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pcbnew/connectivity_algo.cpp b/pcbnew/connectivity_algo.cpp index 6562a3f2e9..bacdc40ef9 100644 --- a/pcbnew/connectivity_algo.cpp +++ b/pcbnew/connectivity_algo.cpp @@ -932,8 +932,18 @@ void CN_CONNECTIVITY_ALGO::MarkNetAsDirty( int aNet ) return; if( (int) m_dirtyNets.size() <= aNet ) + { + int lastNet = m_dirtyNets.size() - 1; + + if( lastNet < 0 ) + lastNet = 0; + m_dirtyNets.resize( aNet + 1 ); + for( int i = lastNet; i < aNet + 1; i++ ) + m_dirtyNets[i] = true; + } + m_dirtyNets[aNet] = true; }