- if ( m_isEnabled != bDoEnable ) {
- long rc = EnableMenuItem(GetHMenuOf(m_parentMenu),
- GetRealId(),
- MF_BYCOMMAND |
- (bDoEnable ? MF_ENABLED : MF_GRAYED));
-
- if ( rc == -1 ) {
- wxLogLastError("EnableMenuItem");
- }
+ if ( m_isEnabled == enable )
+ return;
+
+ long rc = EnableMenuItem(GetHMenuOf(m_parentMenu),
+ GetRealId(),
+ MF_BYCOMMAND |
+ (enable ? MF_ENABLED : MF_GRAYED));