git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23589
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+ // If an item is selected at or below the point of insertion, we need to
+ // increment the member variables because the current row's index has gone
+ // up by one
+ if ( HasCurrent() && m_current >= id )
+ {
+ m_current++;
+ }
+
SendNotify(id, wxEVT_COMMAND_LIST_INSERT_ITEM);
RefreshLines(id, GetItemCount() - 1);
SendNotify(id, wxEVT_COMMAND_LIST_INSERT_ITEM);
RefreshLines(id, GetItemCount() - 1);