From ddb7b2b2b7f4fa0ce0d6b3edc88511a26f3fe856 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 2 Apr 2020 10:40:10 +0200 Subject: [PATCH] pns router: fix possible hang when using "end" key to finish the current track. Add also left double click (same as "end" key) to finish the track. Fixes #4116 https://gitlab.com/kicad/code/kicad/issues/4116 --- pcbnew/router/router_tool.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 5f0217b649..c76140613b 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -798,7 +798,6 @@ void ROUTER_TOOL::performRouting() bool needLayerSwitch = m_router->IsPlacingVia(); bool forceFinish = evt->Modifier( MD_SHIFT ); - if( m_router->FixRoute( m_endSnapPoint, m_endItem, forceFinish ) ) { break; @@ -831,13 +830,10 @@ void ROUTER_TOOL::performRouting() updateEndItem( *evt ); m_router->Move( m_endSnapPoint, m_endItem ); // refresh } - else if( evt->IsAction( &ACT_EndTrack ) ) + else if( evt->IsAction( &ACT_EndTrack ) || evt->IsDblClick( BUT_LEFT ) ) { - bool still_routing = true; - - while( still_routing ) - still_routing = m_router->FixRoute( m_endSnapPoint, m_endItem ); - + // Stop current routing: + m_router->FixRoute( m_endSnapPoint, m_endItem, true ); break; } else if( evt->IsCancelInteractive() || evt->IsActivate()