PNS: Line placer returns false when nothing committed

The true/false return should be triggered on whether any elements have
been commited to the line

Fixes #3969 | https://gitlab.com/kicad/code/kicad/issues/3969
This commit is contained in:
Seth Hillbrand 2020-03-02 07:09:42 -08:00
parent 20ca5a6973
commit 18db471967
2 changed files with 10 additions and 8 deletions

View File

@ -1101,16 +1101,16 @@ bool LINE_PLACER::FixRoute( const VECTOR2I& aP, ITEM* aEndItem, bool aForceFinis
if( !l.SegmentCount() )
{
if( pl.EndsWithVia() )
{
// Nothing to commit if we have an empty line
if( !pl.EndsWithVia() )
return false;
m_lastNode->Add( Clone( pl.Via() ) );
m_lastNode = NULL;
m_currentNode = NULL;
m_idle = true;
m_placementCorrect = true;
}
return true;
}

View File

@ -834,8 +834,10 @@ void ROUTER_TOOL::performRouting()
else if( evt->IsAction( &ACT_EndTrack ) )
{
bool still_routing = true;
while( still_routing )
still_routing = m_router->FixRoute( m_endSnapPoint, m_endItem );
break;
}
else if( evt->IsCancelInteractive() || evt->IsActivate()