pcbnew: Set flag when cancelling during routing

Fixes https://gitlab.com/kicad/code/kicad/issues/4475
This commit is contained in:
Seth Hillbrand 2020-06-04 15:46:56 -07:00
parent bcd5d7f22e
commit 674226f99f
1 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router * KiRouter - a push-and-(sometimes-)shove PCB router
* *
* Copyright (C) 2013-2017 CERN * Copyright (C) 2013-2017 CERN
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2017-2020 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch> * Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
@ -777,7 +777,13 @@ void ROUTER_TOOL::performRouting()
frame()->GetCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); frame()->GetCanvas()->SetCurrentCursor( wxCURSOR_PENCIL );
// Don't crash if we missed an operation that cancelled routing. // Don't crash if we missed an operation that cancelled routing.
wxCHECK2( m_router->RoutingInProgress(), break ); if( !m_router->RoutingInProgress() )
{
if( evt->IsCancelInteractive() )
m_cancelled = true;
break;
}
handleCommonEvents( *evt ); handleCommonEvents( *evt );