Keep unknown nets at 0 while routing.
Previous algorithm used a static variable which it decremented for each new unconnected track, but this resulted in the router marking earlier fixed segments as collisions (because they would get set to netcode = 0 when "fixed"). Fixes: lp:1762043 * https://bugs.launchpad.net/kicad/+bug/1762043
This commit is contained in:
parent
26ee673a6b
commit
7a7da560bc
|
@ -854,19 +854,9 @@ bool LINE_PLACER::SetLayer( int aLayer )
|
||||||
|
|
||||||
bool LINE_PLACER::Start( const VECTOR2I& aP, ITEM* aStartItem )
|
bool LINE_PLACER::Start( const VECTOR2I& aP, ITEM* aStartItem )
|
||||||
{
|
{
|
||||||
VECTOR2I p( aP );
|
m_currentStart = VECTOR2I( aP );
|
||||||
|
m_currentEnd = VECTOR2I( aP );
|
||||||
static int unknowNetIdx = 0; // -10000;
|
m_currentNet = std::max( 0, aStartItem ? aStartItem->Net() : 0 );
|
||||||
int net = -1;
|
|
||||||
|
|
||||||
if( !aStartItem || aStartItem->Net() < 0 )
|
|
||||||
net = unknowNetIdx--;
|
|
||||||
else
|
|
||||||
net = aStartItem->Net();
|
|
||||||
|
|
||||||
m_currentStart = p;
|
|
||||||
m_currentEnd = p;
|
|
||||||
m_currentNet = net;
|
|
||||||
m_startItem = aStartItem;
|
m_startItem = aStartItem;
|
||||||
m_placingVia = false;
|
m_placingVia = false;
|
||||||
m_chainedPlacement = false;
|
m_chainedPlacement = false;
|
||||||
|
|
Loading…
Reference in New Issue