fixed appending menu items for a (popup) menu with a title broken by last change (and also fixed inserting in this case which didn't work even before last change)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-06-24 00:09:34 +00:00
parent 763b330106
commit 5c5871a4fc

View File

@ -390,6 +390,10 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
pos = GetMenuItemCount() - 1;
}
// adjust position to account for the title, if any
if ( !m_title.empty() )
pos += 2; // for the title itself and its separator
BOOL ok = false;
// check if we have something more than a simple text item