replacing line 328 with: sprintf(buffer,"%d",it->Index()); to print the ID of the point instead of the number of the iterator. This way the numbers on screen match with the numbers in the listview.