correct the checked flag in the event generated by checkable menu items (fixes bug introduced in 1.143.2.1, patch 1685634)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -95,6 +95,8 @@ wxMSW:
|
|||||||
- Corrected wxStaticBox label appearance when its foreground colour was set:
|
- Corrected wxStaticBox label appearance when its foreground colour was set:
|
||||||
it didn't respect font size nor background colour then (Juan Antonio Ortega)
|
it didn't respect font size nor background colour then (Juan Antonio Ortega)
|
||||||
- Don't lose combobox text when it's opened and closed (Kolya Kosenko)
|
- Don't lose combobox text when it's opened and closed (Kolya Kosenko)
|
||||||
|
- Corrected GetChecked() for events from checkable menu items (smanders)
|
||||||
|
|
||||||
|
|
||||||
2.8.3
|
2.8.3
|
||||||
-----
|
-----
|
||||||
|
@@ -798,10 +798,10 @@ bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id)
|
|||||||
if ( item && item->IsCheckable() )
|
if ( item && item->IsCheckable() )
|
||||||
item->Toggle();
|
item->Toggle();
|
||||||
|
|
||||||
// get the checked status of the menu item: note that menuState is the
|
// get the status of the menu item: note that it has been just changed
|
||||||
// old state of the menu, so the test for MF_CHECKED must be inverted
|
// by Toggle() above so here we already get the new state of the item
|
||||||
UINT menuState = ::GetMenuState(GetHmenu(), id, MF_BYCOMMAND);
|
UINT menuState = ::GetMenuState(GetHmenu(), id, MF_BYCOMMAND);
|
||||||
SendEvent(id, !(menuState & MF_CHECKED));
|
SendEvent(id, menuState & MF_CHECKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user