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
This commit is contained in:
Seth Hillbrand 2018-07-03 08:19:35 -07:00
parent 3df27430c7
commit 101b68b610
1 changed files with 5 additions and 4 deletions

View File

@ -384,11 +384,12 @@ bool DIFF_PAIR_PLACER::SetLayer( int aLayer )
{ {
m_currentLayer = aLayer; m_currentLayer = aLayer;
return true; return true;
} else if( m_chainedPlacement ) }
else if( m_chainedPlacement || !m_prevPair )
{
return false; 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_prevPair->PrimP()->Layers().Overlaps( aLayer ) ) )
{ {
m_currentLayer = aLayer; m_currentLayer = aLayer;