Fixed regression in wxMenuItem::Check introduced by dbd98a10
.
Internal check flag (via wxMenuItemBase::Check) has to be set as a first to avoid generating a spurious wxEVT_MENU when menu item is checked.
This commit is contained in:
@@ -693,14 +693,13 @@ void wxMenuItem::Check( bool check )
|
|||||||
|
|
||||||
wxFALLTHROUGH;
|
wxFALLTHROUGH;
|
||||||
case wxITEM_CHECK:
|
case wxITEM_CHECK:
|
||||||
|
wxMenuItemBase::Check( check );
|
||||||
gtk_check_menu_item_set_active( (GtkCheckMenuItem*)m_menuItem, (gint)check );
|
gtk_check_menu_item_set_active( (GtkCheckMenuItem*)m_menuItem, (gint)check );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( wxT("can't check this item") );
|
wxFAIL_MSG( wxT("can't check this item") );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuItemBase::Check( check );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMenuItem::Enable( bool enable )
|
void wxMenuItem::Enable( bool enable )
|
||||||
|
Reference in New Issue
Block a user