Fixed job UI cancellation

It was broken since the modernization.
This commit is contained in:
Virgil Dupras 2013-08-03 18:33:35 -04:00
parent c93a88f8b0
commit 21c64545e5
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ class ProgressWindow(GUIObject, ThreadedJobPerformer):
self.jobid = None
def cancel(self):
self.user_cancelled = True
self.job_cancelled = True
def pulse(self):
# Call this regularly from the GUI main run loop.
@ -44,7 +44,6 @@ class ProgressWindow(GUIObject, ThreadedJobPerformer):
# target is a function with its first argument being a Job. It can then be followed by other
# arguments which are passed as `args`.
self.jobid = jobid
self.user_cancelled = False
self.progressdesc_textfield.text = ''
j = self.create_job()
args = tuple([j] + list(args))

View File

@ -24,6 +24,7 @@ class ProgressWindow(QProgressDialog):
self.setAutoClose(False)
self._timer = QTimer()
self._timer.timeout.connect(self.model.pulse)
self.canceled.connect(self.model.cancel)
# --- Callbacks
def refresh(self): # Labels