X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/71e030352d74e4e6aed28cfcb0ea6edf3d17af6e..3c62105945ed63c3b7db9e3e14d942727cb056f9:/src/common/framecmn.cpp diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 55ce182110..fc7b2f413a 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -182,12 +182,17 @@ bool wxFrameBase::ProcessCommand(int id) commandEvent.SetEventObject(this); wxMenuItem *item = bar->FindItem(id); - if ( item && item->IsCheckable() ) + if (item) { - item->Toggle(); - - // use the new value - commandEvent.SetInt(item->IsChecked()); + if (!item->IsEnabled()) + return TRUE; + + if (item->IsCheckable()) + { + item->Toggle(); + // use the new value + commandEvent.SetInt(item->IsChecked()); + } } return GetEventHandler()->ProcessEvent(commandEvent);