diff --git a/src/gui/banlistoptionsdialog.cpp b/src/gui/banlistoptionsdialog.cpp index 171612055..040cbc1df 100644 --- a/src/gui/banlistoptionsdialog.cpp +++ b/src/gui/banlistoptionsdialog.cpp @@ -107,8 +107,12 @@ void BanListOptionsDialog::on_buttonBanIP_clicked() void BanListOptionsDialog::on_buttonDeleteIP_clicked() { - const QModelIndexList selection = m_ui->bannedIPList->selectionModel()->selectedIndexes(); - for (const auto &i : selection) + QModelIndexList selection = m_ui->bannedIPList->selectionModel()->selectedIndexes(); + std::sort(selection.begin(), selection.end(), [](const QModelIndex &left, const QModelIndex &right) + { + return (left.row() > right.row()); + }); + for (const QModelIndex &i : selection) m_sortFilter->removeRow(i.row()); m_modified = true; diff --git a/src/gui/banlistoptionsdialog.ui b/src/gui/banlistoptionsdialog.ui index 04293f3fb..e218b2141 100644 --- a/src/gui/banlistoptionsdialog.ui +++ b/src/gui/banlistoptionsdialog.ui @@ -49,6 +49,9 @@ 0 + + QAbstractItemView::ExtendedSelection + false