Pulse the progress bar 'automatically' if we haven't had a progress update for a...
authorCarl Hetherington <cth@carlh.net>
Thu, 4 Nov 2021 22:44:11 +0000 (23:44 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 Nov 2021 21:34:20 +0000 (22:34 +0100)
Should help with #2119.

src/wx/job_view.cc

index 231176e4fd96c773d1f96a779de648647f0ddf3a..77620142473af4a6d0823da4c283d2ffefbad0d9 100644 (file)
@@ -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 ();
+               }
        }
 }