git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50298
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
{
if ( !wxMenuBase::DoRemove(item) )
wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
{
if ( !wxMenuBase::DoRemove(item) )
- return (wxMenuItem *)NULL;
+ return NULL;
+
+ GtkWidget * const mitem = item->GetMenuItem();
+ if ( m_prevRadio == mitem )
+ {
+ // deleting an item starts a new radio group (has to as we shouldn't
+ // keep a deleted pointer anyhow)
+ m_prevRadio = NULL;
+ }
// TODO: this code doesn't delete the item factory item and this seems
// impossible as of GTK 1.2.6.
// 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() );
+ gtk_widget_destroy( mitem );