Fix ESC handling with whitelist.
This commit is contained in:
parent
0370eff7ba
commit
a3486b7cd4
|
@ -511,9 +511,7 @@ void DIALOG_SHIM::OnButton( wxCommandEvent& aEvent )
|
|||
|
||||
void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt )
|
||||
{
|
||||
// Do not send WXK_ESCAPE char hook event to the parent frame
|
||||
// It must be handled by the dialog itself
|
||||
if( m_parentFrame && aEvt.GetKeyCode() != WXK_ESCAPE )
|
||||
if( m_parentFrame )
|
||||
{
|
||||
m_parentFrame->DispatchBehindModalDialog( aEvt );
|
||||
|
||||
|
|
|
@ -532,7 +532,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent, std::set<const TOOL_ACTI
|
|||
handled = m_toolMgr->ProcessEvent( *evt, aWhiteList );
|
||||
|
||||
// ESC is the special key for canceling tools, and is therefore seen as handled
|
||||
if( key == WXK_ESCAPE )
|
||||
if( key == WXK_ESCAPE && ( !aWhiteList || aWhiteList.count( ACTIONS::cancelInteractive ) ) )
|
||||
handled = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue