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
This commit is contained in:
jean-pierre charras 2020-04-02 10:40:10 +02:00
parent e91f1f57dd
commit ddb7b2b2b7
1 changed files with 3 additions and 7 deletions

View File

@ -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()