git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10269
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, id);
event.SetEventObject(this);
- event.SetExtraLong((long) toggleDown);
+
+ // we use SetInt() to make wxCommandEvent::IsChecked() return toggleDown
+ event.SetInt((int)toggleDown);
+
+ // and SetExtraLong() for backwards compatibility
+ event.SetExtraLong((long)toggleDown);
// Send events to this toolbar instead (and thence up the window hierarchy)
GetEventHandler()->ProcessEvent(event);