From 191abe25add79f839146fee54bd6d7f0cce35ec9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 22 Mar 2007 03:01:50 +0000 Subject: [PATCH] correct the checked flag in the event generated by checkable menu items (fixes bug introduced in 1.144, patch 1685634) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/menu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.47.2