1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 23:07:59 +00:00

- Make sure a torrent is always selected when we switch filters

This commit is contained in:
Christophe Dumez 2009-11-09 07:05:06 +00:00
parent bf727c11d3
commit 6ecde51e45

View File

@ -828,4 +828,7 @@ void TransferListWidget::applyFilter(int f) {
default:
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);
}