Reset accelerator table after removing last accelerator in wxMSW wxMenuBar.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 2 Mar 2013 12:11:53 +0000 (12:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 2 Mar 2013 12:11:53 +0000 (12:11 +0000)
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

src/msw/menu.cpp

index f1559bdb5780b5b5cd7d86bf00ff9a14ae2d1ac1..37965b485a7da6e08327309d6a145ec7dd1709b2 100644 (file)
@@ -1534,6 +1534,10 @@ void wxMenuBar::RebuildAccelTable()
 
         delete [] accelEntries;
     }
+    else // No (more) accelerators.
+    {
+        SetAcceleratorTable(wxAcceleratorTable());
+    }
 }
 
 #endif // wxUSE_ACCEL