git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41304
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return m_genericImpl->InsertItem(info);
if (m_dbImpl){
return m_genericImpl->InsertItem(info);
if (m_dbImpl){
+ int count = GetItemCount();
+
+ if (info.m_itemId > count)
+ info.m_itemId = count;
+
m_dbImpl->MacInsertItem(info.m_itemId, &info );
wxListEvent event( wxEVT_COMMAND_LIST_INSERT_ITEM, GetId() );
event.SetEventObject( this );
m_dbImpl->MacInsertItem(info.m_itemId, &info );
wxListEvent event( wxEVT_COMMAND_LIST_INSERT_ITEM, GetId() );
event.SetEventObject( this );