X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9f7896861f734ce044ee8601ba2d8a6959c9d9e..129b8b1a215fc1fcc1b9f06daa0aeaf22bbce614:/src/msw/menu.cpp diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 92e7ff076c..5e24fd40b9 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -798,10 +798,10 @@ bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id) if ( item && item->IsCheckable() ) item->Toggle(); - // get the checked status of the menu item: note that menuState is the - // old state of the menu, so the test for MF_CHECKED must be inverted + // get the status of the menu item: note that it has been just changed + // by Toggle() above so here we already get the new state of the item UINT menuState = ::GetMenuState(GetHmenu(), id, MF_BYCOMMAND); - SendEvent(id, !(menuState & MF_CHECKED)); + SendEvent(id, menuState & MF_CHECKED); } return true;