Fix save accelerator key handling when library tree has focus.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8247
This commit is contained in:
Wayne Stambaugh 2021-05-03 19:40:41 -04:00
parent c7345096f8
commit 16bb45208a
2 changed files with 10 additions and 0 deletions

View File

@ -223,6 +223,11 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
KIPLATFORM::APP::SetShutdownBlockReason( this, _( "Library changes are unsaved" ) );
// Catch unhandled accelerator command characters that were no handled by the library tree
// panel.
Bind( wxEVT_CHAR, &TOOL_DISPATCHER::DispatchWxEvent, m_toolDispatcher );
Bind( wxEVT_CHAR_HOOK, &TOOL_DISPATCHER::DispatchWxEvent, m_toolDispatcher );
// Ensure the window is on top
Raise();
}

View File

@ -283,6 +283,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
// Default shutdown reason until a file is loaded
KIPLATFORM::APP::SetShutdownBlockReason( this, _( "Footprint changes are unsaved" ) );
// Catch unhandled accelerator command characters that were no handled by the library tree
// panel.
Bind( wxEVT_CHAR, &TOOL_DISPATCHER::DispatchWxEvent, m_toolDispatcher );
Bind( wxEVT_CHAR_HOOK, &TOOL_DISPATCHER::DispatchWxEvent, m_toolDispatcher );
// Ensure the window is on top
Raise();
Show( true );