Browse Source

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

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
b7a3ae2b4c
  1. 6
      src/transferlistwidget.cpp

6
src/transferlistwidget.cpp

@ -1491,7 +1491,9 @@ void TransferListWidget::applyStatusFilter(int f) { @@ -1491,7 +1491,9 @@ void TransferListWidget::applyStatusFilter(int f) {
statusFilterModel->setFilterRegExp(QRegExp());
}
// Select first item if nothing is selected
if(selectionModel()->selectedRows(0).empty() && statusFilterModel->rowCount() > 0)
selectionModel()->setCurrentIndex(statusFilterModel->index(0, TR_NAME), QItemSelectionModel::SelectCurrent|QItemSelectionModel::Rows);
if(selectionModel()->selectedRows(0).empty() && nameFilterModel->rowCount() > 0) {
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);
}
}

Loading…
Cancel
Save