fix index of appended items (broken by previous commit)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -385,8 +385,9 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
LPCTSTR pData = NULL;
|
LPCTSTR pData = NULL;
|
||||||
if ( pos == (size_t)-1 )
|
if ( pos == (size_t)-1 )
|
||||||
{
|
{
|
||||||
// append at the end
|
// append at the end (note that the item is already appended to
|
||||||
pos = GetMenuItemCount();
|
// internal data structures)
|
||||||
|
pos = GetMenuItemCount() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL ok = false;
|
BOOL ok = false;
|
||||||
|
Reference in New Issue
Block a user