1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 20:44:15 +00:00

Fix issue where the properties panel data would not match the currently selected torrent

This commit is contained in:
Christophe Dumez 2010-10-17 09:09:40 +00:00
parent 26d19b33e6
commit b7a3ae2b4c

View File

@ -1491,7 +1491,9 @@ void TransferListWidget::applyStatusFilter(int f) {
statusFilterModel->setFilterRegExp(QRegExp()); statusFilterModel->setFilterRegExp(QRegExp());
} }
// Select first item if nothing is selected // Select first item if nothing is selected
if(selectionModel()->selectedRows(0).empty() && statusFilterModel->rowCount() > 0) if(selectionModel()->selectedRows(0).empty() && nameFilterModel->rowCount() > 0) {
selectionModel()->setCurrentIndex(statusFilterModel->index(0, TR_NAME), QItemSelectionModel::SelectCurrent|QItemSelectionModel::Rows); qDebug("Nothing is selected, selecting first row: %s", qPrintable(nameFilterModel->index(0, TR_NAME).data().toString()));
selectionModel()->setCurrentIndex(nameFilterModel->index(0, TR_NAME), QItemSelectionModel::SelectCurrent|QItemSelectionModel::Rows);
}
} }