X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12ed316d02733e7111a6967f6ae41e2c0ceaa57a..65fa237423b734a06492b25b31fc0881c8c5229b:/src/common/tbarbase.cpp diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index d904ff9194..93e0bab7c7 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -470,7 +470,12 @@ bool wxToolBarBase::OnLeftClick(int id, bool toggleDown) { 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);