summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-11-04 23:44:11 +0100
committerCarl Hetherington <cth@carlh.net>2021-11-13 22:34:20 +0100
commit6c429da71c7bbb3045b57e11a7040126915b6a62 (patch)
tree3ec2b6b59e15090bb1a4598174933332b53c6ed8 /src
parent8d42eb1c35c095f307b62d0620835bedaa46a9fb (diff)
Pulse the progress bar 'automatically' if we haven't had a progress update for a while.
Should help with #2119.
Diffstat (limited to 'src')
-rw-r--r--src/wx/job_view.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wx/job_view.cc b/src/wx/job_view.cc
index 231176e4f..776201424 100644
--- a/src/wx/job_view.cc
+++ b/src/wx/job_view.cc
@@ -103,8 +103,11 @@ JobView::setup ()
void
JobView::maybe_pulse ()
{
- if (_gauge && _job->running() && !_job->progress()) {
- _gauge->Pulse ();
+ if (_gauge && _job->running()) {
+ auto elapsed = _job->seconds_since_last_progress_update();
+ if (!_job->progress() || !elapsed || *elapsed > 2) {
+ _gauge->Pulse ();
+ }
}
}