diff --git a/common/tool/common_tools.cpp b/common/tool/common_tools.cpp index 08aeaaafe7..d320ee1c1e 100644 --- a/common/tool/common_tools.cpp +++ b/common/tool/common_tools.cpp @@ -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; } diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index d49883d476..eeeec511b1 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -430,7 +430,7 @@ OPT 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 ); diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 04ca72922a..482e21bf3a 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -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(); diff --git a/include/id.h b/include/id.h index baeac94865..b88b9fe001 100644 --- a/include/id.h +++ b/include/id.h @@ -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,