]> git.saurik.com Git - wxWidgets.git/commitdiff
Whitelist wxID_NONE as valid menu item ID.
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 9 May 2010 10:27:40 +0000 (10:27 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 9 May 2010 10:27:40 +0000 (10:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/menucmn.cpp

index 6f2a8435998b12bab3858783bd99a0210c4eb0de..d6ad570ef3eeb2200e5a0da83b39ee7f852490fc 100644 (file)
@@ -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