pcbnew: Only dp clearance matrix when routing dp

Fixes: lp:1787766
* https://bugs.launchpad.net/kicad/+bug/1787766
This commit is contained in:
Seth Hillbrand 2018-08-29 10:24:35 -07:00
parent 020d837de6
commit 2398edda38
1 changed files with 2 additions and 1 deletions

View File

@ -190,7 +190,8 @@ int PNS_PCBNEW_RULE_RESOLVER::Clearance( const PNS::ITEM* aA, const PNS::ITEM* a
int cl_b = ( net_b >= 0 ? m_netClearanceCache[net_b].clearance : m_defaultClearance );
// Clearance in differential pairs can only happen when there is a specific net
if( net_a >= 0 && net_b >= 0 && m_netClearanceCache[net_a].coupledNet == net_b )
if( m_router->Mode() == PNS::PNS_MODE_ROUTE_DIFF_PAIR &&
net_a >= 0 && net_b >= 0 && m_netClearanceCache[net_a].coupledNet == net_b )
{
cl_a = m_netClearanceCache[net_a].dpClearance;
cl_b = m_netClearanceCache[net_b].dpClearance;