diff --git a/retroshare-gui/src/gui/MessagesDialog.cpp b/retroshare-gui/src/gui/MessagesDialog.cpp index 5f0be654b..2b3c8e371 100644 --- a/retroshare-gui/src/gui/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/MessagesDialog.cpp @@ -968,9 +968,11 @@ void MessagesDialog::removemessage() { QList selectedIndexList= ui.messagestreeView->selectionModel() -> selectedIndexes (); QList rowList; + QModelIndex selectedIndex; for(QList::iterator it = selectedIndexList.begin(); it != selectedIndexList.end(); it++) { - int row = it->row(); + selectedIndex = proxyModel->mapToSource(*it); + int row = selectedIndex.row(); if (rowList.contains(row) == false) { rowList.append(row);