Try a slightly different tack for cancelling net highlighting.

Fixes https://gitlab.com/kicad/code/kicad/issues/12029
This commit is contained in:
Jeff Young 2022-07-18 22:03:14 +01:00
parent 2ed95073a6
commit e5a664c6b3
4 changed files with 3 additions and 5 deletions

View File

@ -86,7 +86,7 @@ int COMMON_TOOLS::SelectionTool( const TOOL_EVENT& aEvent )
// Since selection tools are run permanently underneath the toolStack, this is really
// just a cancel of whatever other tools might be running.
m_toolMgr->ProcessEvent( TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL, ID_SEL_TOOL ) );
m_toolMgr->ProcessEvent( TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL ) );
return 0;
}

View File

@ -430,7 +430,7 @@ OPT<TOOL_EVENT> TOOL_DISPATCHER::GetToolEvent( wxKeyEvent* aKeyEvent, bool* keyI
#endif
if( key == WXK_ESCAPE ) // ESC is the special key for canceling tools
evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL );
evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL, WXK_ESCAPE );
else
evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_PRESSED, key | mods );

View File

@ -572,7 +572,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
{
ClearSelection();
}
else if( evt->FirstResponder() == this && evt->GetCommandId() != (int) ID_SEL_TOOL )
else if( evt->FirstResponder() == this && evt->GetCommandId() == (int) WXK_ESCAPE )
{
SCH_EDITOR_CONTROL* editor = m_toolMgr->GetTool<SCH_EDITOR_CONTROL>();

View File

@ -102,8 +102,6 @@ enum main_id
ID_OPT_TOOLBAR,
ID_AUX_TOOLBAR,
ID_SEL_TOOL,
ID_LANGUAGE_CHOICE,
ID_LANGUAGE_DANISH,
ID_LANGUAGE_DEFAULT,