diff --git a/src/qtlibtorrent/torrentmodel.cpp b/src/qtlibtorrent/torrentmodel.cpp index d28a8b2ef..9234a1138 100644 --- a/src/qtlibtorrent/torrentmodel.cpp +++ b/src/qtlibtorrent/torrentmodel.cpp @@ -595,6 +595,8 @@ void TorrentModel::stateUpdated(const std::vector &s notifyTorrentChanged(row); } } + + emit modelRefreshed(); } bool TorrentModel::inhibitSystem() diff --git a/src/qtlibtorrent/torrentmodel.h b/src/qtlibtorrent/torrentmodel.h index a39de99e5..8bebce656 100644 --- a/src/qtlibtorrent/torrentmodel.h +++ b/src/qtlibtorrent/torrentmodel.h @@ -101,6 +101,7 @@ signals: void torrentAdded(TorrentModelItem *torrentItem); void torrentAboutToBeRemoved(TorrentModelItem *torrentItem); void torrentChangedLabel(TorrentModelItem *torrentItem, QString previous, QString current); + void modelRefreshed(); private slots: void addTorrent(const QTorrentHandle& h); diff --git a/src/transferlistfilterswidget.cpp b/src/transferlistfilterswidget.cpp index 21618c429..f8734d612 100644 --- a/src/transferlistfilterswidget.cpp +++ b/src/transferlistfilterswidget.cpp @@ -203,7 +203,7 @@ TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferLi // SIGNAL/SLOT connect(statusFilters, SIGNAL(currentRowChanged(int)), transferList, SLOT(applyStatusFilter(int))); - connect(transferList->getSourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(updateTorrentNumbers())); + connect(transferList->getSourceModel(), SIGNAL(modelRefreshed()), SLOT(updateTorrentNumbers())); connect(transferList->getSourceModel(), SIGNAL(torrentAdded(TorrentModelItem*)), SLOT(handleNewTorrent(TorrentModelItem*))); connect(labelFilters, SIGNAL(currentRowChanged(int)), this, SLOT(applyLabelFilter(int))); connect(labelFilters, SIGNAL(torrentDropped(int)), this, SLOT(torrentDropped(int)));