commit 4c8c90f14ca86eea4bccc53862fb3e9adfa1f0dd
parent 4136fb84d1f5054014bdcb9b5594b938dfa29142
Author: cfillion <cfillion@users.noreply.github.com>
Date: Mon, 7 Dec 2015 14:59:56 -0800
fix the progress dialog's label not being updated for the last download
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/progress.cpp b/src/progress.cpp
@@ -29,6 +29,7 @@ void Progress::setTransaction(Transaction *t)
m_transaction->downloadQueue()->onPush(
bind(&Progress::addDownload, this, placeholders::_1));
+ m_transaction->onFinish([=] { m_current = nullptr; });
}
void Progress::onInit()
@@ -61,7 +62,6 @@ void Progress::addDownload(Download *dl)
dl->onFinish([=] {
m_done++;
updateProgress();
- m_current = nullptr;
});
}
diff --git a/src/reapack.cpp b/src/reapack.cpp
@@ -129,6 +129,9 @@ Transaction *ReaPack::createTransaction()
m_transaction = new Transaction(m_config->registry(), m_resourcePath);
+ m_progress->setTransaction(m_transaction);
+ m_progress->show();
+
m_transaction->onReady([=] {
// TODO: display the package list with the changelogs
m_transaction->run();
@@ -152,8 +155,5 @@ Transaction *ReaPack::createTransaction()
m_config->write();
});
- m_progress->setTransaction(m_transaction);
- m_progress->show();
-
return m_transaction;
}