mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-24 10:16:00 +03:00
Allow to select multiple entries in "banned IP" dialog
This commit is contained in:
parent
c7f092b95f
commit
5e671a4b0b
2 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -49,6 +49,9 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
|
Loading…
Reference in a new issue