From 0c51948f7d3fe9fd45d7d47070bcf06ebfc4d364 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 9 May 2010 10:27:40 +0000 Subject: [PATCH] Whitelist wxID_NONE as valid menu item ID. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/menucmn.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 6f2a843599..d6ad570ef3 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -75,6 +75,13 @@ wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu, kind = wxITEM_SEPARATOR; break; + case wxID_NONE: + // (popup) menu titles in wxMSW use this ID to indicate that + // it's not a real menu item, so we don't want the check below to + // apply to it + m_id = id; + break; + default: // ids are limited to 16 bits under MSW so portable code shouldn't // use ids outside of this range (negative ids generated by wx are -- 2.45.2