mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-10-22 07:21:21 +00:00
GUI: jobs: resetting total progress must clear number completed jobs
Otherwise the total progress will jump back to 100% whenever the progress is updated (e.g. when a job is removed).
This commit is contained in:
parent
d2af08f770
commit
7ff6175a95
@ -425,6 +425,18 @@ Model::stop() {
|
||||
emit queueStatusChanged(QueueStatus::Stopped);
|
||||
}
|
||||
|
||||
void
|
||||
Model::resetTotalProgress() {
|
||||
QMutexLocker locked{&m_mutex};
|
||||
|
||||
if (isRunning() || !m_queueNumDone)
|
||||
return;
|
||||
|
||||
m_queueNumDone = 0;
|
||||
|
||||
emit progressChanged(0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
Model::updateProgress() {
|
||||
QMutexLocker locked{&m_mutex};
|
||||
|
@ -100,6 +100,8 @@ public slots:
|
||||
void acknowledgeAllErrors();
|
||||
void acknowledgeSelectedErrors(QAbstractItemView *view);
|
||||
|
||||
void resetTotalProgress();
|
||||
|
||||
protected:
|
||||
QList<QStandardItem *> createRow(Job const &job) const;
|
||||
void setRowText(QList<QStandardItem *> const &items, Job const &job) const;
|
||||
|
@ -124,6 +124,8 @@ Tool::setupActions() {
|
||||
connect(ui->jobs, &QTreeView::doubleClicked, this, &Tool::onViewOutput);
|
||||
|
||||
connect(mw, &MainWindow::preferencesChanged, this, &Tool::retranslateUi);
|
||||
|
||||
connect(MainWindow::watchCurrentJobTab(), &WatchJobs::Tab::watchCurrentJobTabCleared, m_model, &Model::resetTotalProgress);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user