]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/menu_osx.cpp
Disable some wxWebView tests that fail on the buildbot but not locally.
[wxWidgets.git] / src / osx / menu_osx.cpp
index 964915949f9b7c5e8e6d700cc567c35bc02fc57c..ee18135ab7ada349c7d30aef092aa64968229708 100644 (file)
@@ -210,6 +210,17 @@ wxMenuItem* wxMenu::DoInsert(size_t pos, wxMenuItem *item)
 
 wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
 {
+    if ( m_startRadioGroup != -1 )
+    {
+        // Check if we're removing the item starting the radio group
+        if ( GetMenuItems().Item(m_startRadioGroup)->GetData() == item )
+        {
+            // Yes, we do, so reset its index as the next item added shouldn't
+            // count as part of the same radio group anyhow.
+            m_startRadioGroup = -1;
+        }
+    }
+
 /*
     // we need to find the items position in the child list
     size_t pos;