update the popup menu item when it's [un]checked too, as it already happens for the items in the main menu bar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
bb596005f5
commit
18138662ef
@ -777,7 +777,12 @@ bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id)
|
||||
// ignore commands from the menu title
|
||||
if ( id != (WXWORD)idMenuTitle )
|
||||
{
|
||||
// get the checked status of the command: notice that menuState is the
|
||||
// update the check item when it's clicked
|
||||
wxMenuItem * const item = FindItem(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
|
||||
UINT menuState = ::GetMenuState(GetHmenu(), id, MF_BYCOMMAND);
|
||||
SendEvent(id, !(menuState & MF_CHECKED));
|
||||
|
Loading…
Reference in New Issue
Block a user