- wxMenuItem* item = menu->FindChildItem( id );
- wxCHECK_RET( item, wxT("error in menu item callback") );
-
- if (item->IsCheckable())
- {
- bool isReallyChecked = item->IsChecked(),
- isInternallyChecked = item->wxMenuItemBase::IsChecked();
-
- // ensure that the internal state is always consistent with what is
- // shown on the screen
- item->wxMenuItemBase::Check(isReallyChecked);
-
- // we must not report the events for the radio button going up nor the
- // events resulting from the calls to wxMenuItem::Check()
- if ( (item->GetKind() == wxITEM_RADIO && !isReallyChecked) ||
- (isInternallyChecked == isReallyChecked) )
- {
- return;
- }
-
- // the user pressed on the menu item: report the event below
- }
-