Applied patch from SF on menu command not blocked
if they are disabled but still emitted by an accelerator First attempt at adding wxSizer::Clear(). Further testing pending :-) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user