From 2948f8a6bc13f19a161b04ec60ffcfc9cdc02ec8 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 14 Feb 2019 20:50:50 -0800 Subject: [PATCH] cvpcb: Testing theory on save hotkey override Bug #1807567 states the entering 's' in the string search textbox does not get passed to the text box correctly when in the German language under windows. This likely means that the main window is firing wxSave when it detects the 's' key. By adjusting the id for the save and continue action, we hope to allow the signal to pass through to the textbox. This commit should otherwise be a NOP. N.B. This appears to be the result of hooking wxEVT_CHAR_HOOK into EDA_DRAW_PANEL::OnKeyEvent() (commit 53b1ec81462727eec770204b57cadbabdcfc57de) that reverses the cascade of events from bottom up rather than top down. Fixing that is a longer project and will likely be a side effect of switching fully to the new tool architecture. --- cvpcb/cvpcb_mainframe.cpp | 4 ++-- cvpcb/menubar.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index 12502b92e5..a1d1e099c5 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -63,7 +63,7 @@ static const wxString FilterFootprintEntry = "FilterFootprint"; BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, KIWAY_PLAYER ) // Menu events - EVT_MENU( wxID_SAVE, CVPCB_MAINFRAME::OnSaveAndContinue ) + EVT_MENU( ID_SAVE_PROJECT, CVPCB_MAINFRAME::OnSaveAndContinue ) EVT_MENU( wxID_EXIT, CVPCB_MAINFRAME::OnQuit ) EVT_MENU( wxID_HELP, CVPCB_MAINFRAME::GetKicadHelp ) EVT_MENU( wxID_ABOUT, CVPCB_MAINFRAME::GetKicadAbout ) @@ -189,7 +189,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : auto buttonsSizer = new wxBoxSizer( wxHORIZONTAL ); auto sdbSizer = new wxStdDialogButtonSizer(); - m_saveAndContinue = new wxButton( bottomPanel, wxID_SAVE, + m_saveAndContinue = new wxButton( bottomPanel, ID_SAVE_PROJECT, _( "Apply, Save Schematic && Continue" ) ); buttonsSizer->Add( m_saveAndContinue, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 20 ); diff --git a/cvpcb/menubar.cpp b/cvpcb/menubar.cpp index cf35f01e84..8f55ab7b47 100644 --- a/cvpcb/menubar.cpp +++ b/cvpcb/menubar.cpp @@ -53,7 +53,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() wxMenu* filesMenu = new wxMenu; // Save the footprints back into eeschema - AddMenuItem( filesMenu, wxID_SAVE, + AddMenuItem( filesMenu, ID_SAVE_PROJECT, _( "&Save Schematic\tCtrl+S" ), SAVE_HLP_MSG, KiBitmap( save_xpm ) );