From 5bdac8b4d715a6516997a7ad1db4fa18b17baeef Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 1 Aug 2017 10:03:47 -0400 Subject: [PATCH] Bug1698: don't use 0 for menu item ID on Mac (assertion in wxWidgets) --- src/prefs/KeyConfigPrefs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/prefs/KeyConfigPrefs.cpp b/src/prefs/KeyConfigPrefs.cpp index 82e409040..f89129342 100644 --- a/src/prefs/KeyConfigPrefs.cpp +++ b/src/prefs/KeyConfigPrefs.cpp @@ -398,8 +398,8 @@ void KeyConfigPrefs::OnExport(wxCommandEvent & WXUNUSED(event)) void KeyConfigPrefs::OnDefaults(wxCommandEvent & event) { wxMenu Menu; - Menu.Append( 0, _("Standard") ); - Menu.Append( 1, _("Full") ); + Menu.Append( 1, _("Standard") ); + Menu.Append( 2, _("Full") ); Menu.Bind( wxEVT_COMMAND_MENU_SELECTED, &KeyConfigPrefs::OnImportDefaults, this ); // Pop it up where the mouse is. PopupMenu(&Menu);//, wxPoint(0, 0)); @@ -475,7 +475,7 @@ void KeyConfigPrefs::OnImportDefaults(wxCommandEvent & event) gPrefs->Flush(); mNewKeys = mDefaultKeys; - if( event.GetId() == 0 ) + if( event.GetId() == 1 ) FilterKeys( mNewKeys ); for (size_t i = 0; i < mNewKeys.GetCount(); i++) {