BUGFIX: Fix issue causing torrents not to be displayed in the list

This commit is contained in:
Christophe Dumez
2010-01-23 19:04:44 +00:00
parent 659664509a
commit 86ca755dfe
2 changed files with 14 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.1.2
- BUGFIX: Fix issue causing torrents not to be displayed in the list
- BUGFIX: Fix overwrite check when renaming a folder in a torrent
- BUGFIX: Force a recheck after renaming files to avoid overwriting
- BUGFIX: Improve "Open destination folder" behavior

View File

@@ -446,6 +446,19 @@ void TransferListWidget::refreshList() {
// Refresh only if displayed
if(main_window->getCurrentTabIndex() != TAB_TRANSFER) return;
unsigned int nb_downloading = 0, nb_seeding=0, nb_active=0, nb_inactive = 0;
if(BTSession->getSession()->get_torrents().size() != (uint)listModel->rowCount()) {
// Oups, we have torrents that are not displayed, fix that
std::vector<torrent_handle> torrents = BTSession->getSession()->get_torrents();
std::vector<torrent_handle>::iterator itr = torrents.begin();
while(itr != torrents.end()) {
QTorrentHandle h(*itr);
if(h.is_valid() && getRowFromHash(h.hash()) < 0) {
addTorrent(h);
}
itr++;
}
}
for(int i=0; i<listModel->rowCount(); ++i) {
int s = updateTorrent(i);
switch(s) {