- Fix bugs with torrent labeling (Problems when adding a torrent when a filter was selected)

This commit is contained in:
Christophe Dumez 2010-01-03 18:51:24 +00:00
parent af5c1096b5
commit 719b32ba36
3 changed files with 12 additions and 4 deletions

View file

@ -192,7 +192,7 @@ void TransferListWidget::addTorrent(QTorrentHandle& h) {
if(listModel->rowCount() == 1)
selectionModel()->setCurrentIndex(proxyModel->index(row, TR_NAME), QItemSelectionModel::SelectCurrent|QItemSelectionModel::Rows);
// Emit signal
emit torrentAdded(mapFromSource(listModel->index(row, 0)));
emit torrentAdded(listModel->index(row, 0));
// Refresh the list
refreshList();
} catch(invalid_handle e) {
@ -201,6 +201,10 @@ void TransferListWidget::addTorrent(QTorrentHandle& h) {
}
}
QStandardItemModel* TransferListWidget::getSourceModel() const {
return listModel;
}
void TransferListWidget::setRowColor(int row, QColor color) {
unsigned int nbColumns = listModel->columnCount()-1;
for(unsigned int i=0; i<nbColumns; ++i) {