Try a slightly different tack for cancelling net highlighting.
Fixes https://gitlab.com/kicad/code/kicad/issues/12029
This commit is contained in:
parent
2ed95073a6
commit
e5a664c6b3
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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>();
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue