wxMenuBar::IsEnabled() now returns TRUE sometimes too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -778,7 +778,8 @@ bool wxMenuBar::IsEnabled(int id) const
|
|||||||
|
|
||||||
int flag = ::GetMenuState(GetHmenuOf(itemMenu), id, MF_BYCOMMAND) ;
|
int flag = ::GetMenuState(GetHmenuOf(itemMenu), id, MF_BYCOMMAND) ;
|
||||||
|
|
||||||
return (flag & MF_ENABLED) != 0;
|
// don't "and" with MF_ENABLED because its value is 0
|
||||||
|
return (flag & MF_DISABLED) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMenuBar::SetLabel(int id, const wxString& label)
|
void wxMenuBar::SetLabel(int id, const wxString& label)
|
||||||
|
Reference in New Issue
Block a user