X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d9f12f3b9f997b6308faf336d5381be591b71f4..2d33aec94c9217b94ada107fbd125db4c51c22ab:/src/common/framecmn.cpp diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 4b12d0e9a3..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); @@ -244,17 +249,6 @@ wxStatusBar *wxFrameBase::OnCreateStatusBar(int number, { wxStatusBar *statusBar = new wxStatusBar(this, id, style, name); - // Set the height according to the font and the border size - wxClientDC dc(statusBar); - dc.SetFont(statusBar->GetFont()); - - wxCoord y; - dc.GetTextExtent( "X", NULL, &y ); - - int height = (int)( (11*y)/10 + 2*statusBar->GetBorderY()); - - statusBar->SetSize( -1, -1, -1, height ); - statusBar->SetFieldsCount(number); return statusBar;