From 61151645fdcd3505378bdeb831966642ce835253 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Thu, 2 Jan 2025 13:24:43 -0800 Subject: [PATCH] fix export job progress may flicker w/ "--:--:--" --- src/jobqueue.cpp | 4 +++- src/jobs/meltjob.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jobqueue.cpp b/src/jobqueue.cpp index 7ccbf1f1a7..4c30936b10 100644 --- a/src/jobqueue.cpp +++ b/src/jobqueue.cpp @@ -89,7 +89,9 @@ void JobQueue::onProgressUpdated(QStandardItem *standardItem, int percent) remaining = tr("paused"); } else if (percent > 0) { auto time = job->estimateRemaining(percent); - if (percent > 2 && QTime(0, 0).secsTo(time) > 0) + if (QTime(0, 0).secsTo(time) == 0) + return; + if (percent > 2) remaining = time.toString(); remaining = QStringLiteral("%1% (%2)").arg(percent).arg(remaining); } diff --git a/src/jobs/meltjob.cpp b/src/jobs/meltjob.cpp index 52ba082e0c..019f693d4e 100644 --- a/src/jobs/meltjob.cpp +++ b/src/jobs/meltjob.cpp @@ -201,7 +201,7 @@ void MeltJob::onReadyRead() index = msg.indexOf("percentage:"); if (index > -1) { int percent = msg.mid(index + 11).toInt(); - if (percent != m_previousPercent) { + if (percent > 0 && percent != m_previousPercent) { emit progressUpdated(m_item, percent); QCoreApplication::processEvents(); m_previousPercent = percent;