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