fix removing menu item, ticket 3387

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2008-05-26 17:28:41 +00:00
parent 4b228a7842
commit 1160c0fd3a

View File

@@ -1311,9 +1311,9 @@ wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
if ( !wxMenuBase::DoRemove(item) )
return (wxMenuItem *)NULL;
// TODO: this code doesn't delete the item factory item and this seems
// impossible as of GTK 1.2.6.
gtk_widget_destroy( item->GetMenuItem() );
GtkWidget* mitem = item->GetMenuItem();
gtk_menu_item_set_submenu(GTK_MENU_ITEM(mitem), NULL);
gtk_container_remove(GTK_CONTAINER(m_menu), mitem);
return item;
}