]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/framecmn.cpp
fixed wxTaskBarIcon compilation
[wxWidgets.git] / src / common / framecmn.cpp
index 55ce182110342e95c670bb939ae91da370f67ebb..fc7b2f413af0aeca6f1a6aaabd0e82c28e05a66f 100644 (file)
@@ -182,12 +182,17 @@ bool wxFrameBase::ProcessCommand(int id)
     commandEvent.SetEventObject(this);
 
     wxMenuItem *item = bar->FindItem(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);
     }
 
     return GetEventHandler()->ProcessEvent(commandEvent);