From: Vadim Zeitlin Date: Sat, 2 Mar 2013 12:11:53 +0000 (+0000) Subject: Reset accelerator table after removing last accelerator in wxMSW wxMenuBar. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/23c37c2c4ee81762a0c44a3ccbbc28b8531d4879 Reset accelerator table after removing last accelerator in wxMSW wxMenuBar. We didn't update the accelerator table if no more accelerators were left in it but we still need to do it to stop handling the previously active accelerators. Closes #15078. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index f1559bdb57..37965b485a 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -1534,6 +1534,10 @@ void wxMenuBar::RebuildAccelTable() delete [] accelEntries; } + else // No (more) accelerators. + { + SetAcceleratorTable(wxAcceleratorTable()); + } } #endif // wxUSE_ACCEL