mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07:00
- Make sure a torrent is always selected when we switch filters
This commit is contained in:
parent
bf727c11d3
commit
6ecde51e45
1 changed files with 3 additions and 0 deletions
|
@ -828,4 +828,7 @@ void TransferListWidget::applyFilter(int f) {
|
||||||
default:
|
default:
|
||||||
proxyModel->setFilterRegExp(QRegExp());
|
proxyModel->setFilterRegExp(QRegExp());
|
||||||
}
|
}
|
||||||
|
// Select first item if nothing is selected
|
||||||
|
if(selectionModel()->selectedRows(0).empty() && proxyModel->rowCount() > 0)
|
||||||
|
selectionModel()->setCurrentIndex(proxyModel->index(0, NAME), QItemSelectionModel::SelectCurrent|QItemSelectionModel::Rows);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue