From 3b3496947a9fcf34775c99aa036cf8536c100935 Mon Sep 17 00:00:00 2001 From: Tommy Ellqvist Date: Mon, 3 Aug 2015 16:44:43 +0200 Subject: [PATCH] Fixed responsiveness of suspended module progress bar --- vistrails/gui/job_monitor.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/vistrails/gui/job_monitor.py b/vistrails/gui/job_monitor.py index ee6013952..970660256 100644 --- a/vistrails/gui/job_monitor.py +++ b/vistrails/gui/job_monitor.py @@ -427,11 +427,9 @@ def checkJob(self, module, id, handle): item.job.start)) progress.setLabelText(labelText) while not self.jobMonitor.isDone(handle): - i = 0 - while i < interval: - i += 1 - time.sleep(1) - QtCore.QCoreApplication.processEvents() + dieTime = QtCore.QTime.currentTime().addMSecs(interval*1000) + while QtCore.QTime.currentTime() < dieTime: + QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents, 100) if progress.wasCanceled(): # this does not work, need to create a new progress dialog #progress.goOn()