diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 40cb90565f..ee9369a1de 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2954,7 +2954,7 @@ void wxListMainWindow::InsertItem( wxListItem &item ) else { m_lines.Add( line ); - item.m_itemId = m_lines.GetCount(); + item.m_itemId = m_lines.GetCount()-1; } }