From 9fc60abc1a3b4bfa2c50a9daf67341e6e5c0ae99 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 25 Dec 2010 09:15:22 +0000 Subject: [PATCH] Make sure the number of torrents is properly updated on Startup (closes #694135) --- src/mainwindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9367d4401..8d8f752f9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -168,8 +168,6 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo vSplitter->setCollapsible(0, true); vSplitter->setCollapsible(1, false); tabs->addTab(vSplitter, misc::getIcon("folder-remote"), tr("Transfers")); - connect(transferList->getSourceModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(updateNbTorrents())); - connect(transferList->getSourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(updateNbTorrents())); vboxLayout->addWidget(tabs); // Name filter @@ -277,6 +275,11 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo updater->checkForUpdates(); } #endif + + // Update the number of torrents (tab) + updateNbTorrents(); + connect(transferList->getSourceModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(updateNbTorrents())); + connect(transferList->getSourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(updateNbTorrents())); } void MainWindow::deleteBTSession() {