Respond to <esc> from selection tool.

Fixes: lp:1827917
* https://bugs.launchpad.net/kicad/+bug/1827917
This commit is contained in:
Jeff Young 2019-05-06 21:55:35 +01:00
parent cd2bd23c37
commit f1a38a6d41
1 changed files with 6 additions and 3 deletions

View File

@ -374,12 +374,15 @@ int SCH_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
} }
else if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO_PRE ) else if( evt->IsAction( &ACTIONS::cancelInteractive ) || evt->IsCancel() )
{ {
clearSelection(); clearSelection();
m_toolMgr->RunAction( SCH_ACTIONS::clearHighlight, true );
}
if( evt->IsCancel() && dynamic_cast<SCH_EDIT_FRAME*>( m_frame ) ) else if( evt->Action() == TA_UNDO_REDO_PRE )
m_toolMgr->RunAction( SCH_ACTIONS::clearHighlight, true ); {
clearSelection();
} }
else if( evt->Action() == TA_CONTEXT_MENU_CLOSED ) else if( evt->Action() == TA_CONTEXT_MENU_CLOSED )