router: don't create incorrect non-45 degree connections when routing a track that doesn't have a net assigned
Fixes: lp:1814433 * https://bugs.launchpad.net/kicad/+bug/1814433
This commit is contained in:
parent
08c944a467
commit
5d712716e6
|
@ -181,6 +181,11 @@ public:
|
|||
return m_net;
|
||||
}
|
||||
|
||||
bool InAnyNet() const
|
||||
{
|
||||
return m_net != UnusedNet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function SetLayers()
|
||||
*
|
||||
|
|
|
@ -780,7 +780,15 @@ void LINE_PLACER::routeStep( const VECTOR2I& aP )
|
|||
bool LINE_PLACER::route( const VECTOR2I& aP )
|
||||
{
|
||||
routeStep( aP );
|
||||
return CurrentEnd() == aP;
|
||||
|
||||
if (!m_head.PointCount() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_head.CPoint(-1) == aP;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -946,7 +954,7 @@ bool LINE_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
|
|||
m_lastNode = NULL;
|
||||
}
|
||||
|
||||
route( p );
|
||||
bool reachesEnd = route( p );
|
||||
|
||||
current = Trace();
|
||||
|
||||
|
@ -958,7 +966,7 @@ bool LINE_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
|
|||
NODE* latestNode = m_currentNode;
|
||||
m_lastNode = latestNode->Branch();
|
||||
|
||||
if( eiDepth >= 0 && aEndItem && latestNode->Depth() > eiDepth && current.SegmentCount() )
|
||||
if( reachesEnd && eiDepth >= 0 && aEndItem && latestNode->Depth() > eiDepth && current.SegmentCount() )
|
||||
{
|
||||
SplitAdjacentSegments( m_lastNode, aEndItem, current.CPoint( -1 ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue