X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvLandmarksPanel.cxx;h=7fb80276ad5c8f6bbfb6642b76cdc45f9cc46680;hb=066bd4aaccac469831ac6aa535dbf7f7939be78e;hp=9e891cda5071cc3fd3d7419a5b51cc6a0dd2b6c1;hpb=5ae099d86b4f40afc0e0beb1acbce3c37f1e9436;p=clitk.git diff --git a/vv/vvLandmarksPanel.cxx b/vv/vvLandmarksPanel.cxx index 9e891cd..7fb8027 100644 --- a/vv/vvLandmarksPanel.cxx +++ b/vv/vvLandmarksPanel.cxx @@ -76,8 +76,15 @@ void vvLandmarksPanel::RemoveSelectedPoints() } else { // we're using single-selection mode - mCurrentLandmarks->RemoveLandmark(items[0]->row()); - tableWidget->removeRow(items[0]->row()); + int row = items[0]->row(); + mCurrentLandmarks->RemoveLandmark(row); + tableWidget->removeRow(row); + + for (int i = row; i < tableWidget->rowCount(); i++) { + QTableWidgetItem* iItem = tableWidget->item(i, 0); + iItem->setText(QString::number(i)); + } + } emit UpdateRenderWindows(); }