diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 33da20de3c..e806594f72 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -1101,16 +1101,16 @@ bool LINE_PLACER::FixRoute( const VECTOR2I& aP, ITEM* aEndItem, bool aForceFinis if( !l.SegmentCount() ) { - if( pl.EndsWithVia() ) - { - m_lastNode->Add( Clone( pl.Via() ) ); - m_lastNode = NULL; - m_currentNode = NULL; + // Nothing to commit if we have an empty line + if( !pl.EndsWithVia() ) + return false; - m_idle = true; - m_placementCorrect = true; - } + m_lastNode->Add( Clone( pl.Via() ) ); + m_lastNode = NULL; + m_currentNode = NULL; + m_idle = true; + m_placementCorrect = true; return true; } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index f6dca94118..f9ec861f9a 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -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()