Fix assert during separator items creation introduced by r64226.

Add separators with correct kind, setting m_kind doesn't work any more because
it's overwritten below.

Also add a comment explaining why is overriding the user-specified kind the
right thing to do here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-07 23:38:26 +00:00
parent fd6e15974c
commit a104022931

View File

@@ -67,7 +67,12 @@ wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu,
case wxID_SEPARATOR:
m_id = wxID_SEPARATOR;
m_kind = wxITEM_SEPARATOR;
// there is a lot of existing code just doing Append(wxID_SEPARATOR)
// and it makes sense to omit the following optional parameters,
// including the kind one which doesn't default to wxITEM_SEPARATOR,
// of course, so override it here
kind = wxITEM_SEPARATOR;
break;
default: