From 101b68b610d4334db68f1e4ba9e287b37f65c9a6 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 3 Jul 2018 08:19:35 -0700 Subject: [PATCH] pcbnew: Keep dp placer on initial layer Changing the layer after starting the differential pair placer should not change the inital track layer. Fixes: lp:1779800 * https://bugs.launchpad.net/kicad/+bug/1779800 --- pcbnew/router/pns_diff_pair_placer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pcbnew/router/pns_diff_pair_placer.cpp b/pcbnew/router/pns_diff_pair_placer.cpp index 0a344ef753..476621d709 100644 --- a/pcbnew/router/pns_diff_pair_placer.cpp +++ b/pcbnew/router/pns_diff_pair_placer.cpp @@ -384,11 +384,12 @@ bool DIFF_PAIR_PLACER::SetLayer( int aLayer ) { m_currentLayer = aLayer; return true; - } else if( m_chainedPlacement ) + } + else if( m_chainedPlacement || !m_prevPair ) + { return false; - else if( !m_prevPair ) - return false; - else if( m_prevPair->PrimP() || ( m_prevPair->PrimP()->OfKind( ITEM::VIA_T ) && + } + else if( !m_prevPair->PrimP() || ( m_prevPair->PrimP()->OfKind( ITEM::VIA_T ) && m_prevPair->PrimP()->Layers().Overlaps( aLayer ) ) ) { m_currentLayer = aLayer;